Skip to content

Commit 58e9a76

Browse files
authored
Merge pull request #331 from dli7319/overflow
Glasses UI: Hide text overflow in Card.
2 parents 38fdb28 + 0c7db3d commit 58e9a76

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/addons/glasses/ui/Card.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import {ButtonProperties} from './ButtonProperties';
1414
import {CardActionButton} from './CardActionButton';
1515
import {CardTitleChip} from './CardTitleChip';
1616

17+
/** Default properties for the Card component. */
1718
export const cardDefaults = {
1819
titleChip: undefined as string | undefined,
1920
title: undefined as string | undefined,
@@ -27,8 +28,10 @@ export const cardDefaults = {
2728
...contentDefaults,
2829
};
2930

31+
/** Properties for the Card component. */
3032
export type CardProperties = typeof cardDefaults & BaseOutProperties;
3133

34+
/** A card component that displays content with title, icon, text, and actions. */
3235
export class Card extends Container<CardProperties> {
3336
constructor(properties: InProperties<CardProperties>) {
3437
super(
@@ -55,7 +58,7 @@ export class Card extends Container<CardProperties> {
5558
const borderWidth = 3;
5659
const cardContainer = new Container({
5760
flexDirection: 'column',
58-
borderWidth: borderWidth,
61+
borderWidth,
5962
borderRadius: 40,
6063
borderColor: 0x606460,
6164
// For some reason uikit counts padding from the end of the border.
@@ -171,6 +174,7 @@ export class Card extends Container<CardProperties> {
171174
),
172175
flexGrow: 1,
173176
whiteSpace: 'pre',
177+
overflow: 'hidden',
174178
});
175179
textArea.add(bodyText);
176180

0 commit comments

Comments
 (0)