Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/addons/glasses/ui/Card.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import {ButtonProperties} from './ButtonProperties';
import {CardActionButton} from './CardActionButton';
import {CardTitleChip} from './CardTitleChip';

/** Default properties for the Card component. */
export const cardDefaults = {
titleChip: undefined as string | undefined,
title: undefined as string | undefined,
Expand All @@ -27,8 +28,10 @@ export const cardDefaults = {
...contentDefaults,
};

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

/** A card component that displays content with title, icon, text, and actions. */
export class Card extends Container<CardProperties> {
constructor(properties: InProperties<CardProperties>) {
super(
Expand All @@ -55,7 +58,7 @@ export class Card extends Container<CardProperties> {
const borderWidth = 3;
const cardContainer = new Container({
flexDirection: 'column',
borderWidth: borderWidth,
borderWidth,
borderRadius: 40,
borderColor: 0x606460,
// For some reason uikit counts padding from the end of the border.
Expand Down Expand Up @@ -171,6 +174,7 @@ export class Card extends Container<CardProperties> {
),
flexGrow: 1,
whiteSpace: 'pre',
overflow: 'hidden',
});
textArea.add(bodyText);

Expand Down