diff --git a/packages/@lightningjs/ui-components/src/components/Card/Card.d.ts b/packages/@lightningjs/ui-components/src/components/Card/Card.d.ts index e0af1c4bad..635741d442 100644 --- a/packages/@lightningjs/ui-components/src/components/Card/Card.d.ts +++ b/packages/@lightningjs/ui-components/src/components/Card/Card.d.ts @@ -19,31 +19,22 @@ import type lng from '@lightningjs/core'; import Surface, { SurfaceStyle } from '../Surface'; import { TextBoxStyle } from '../TextBox'; -import type { Color, StylePartial } from '../../types/lui'; -import type { TextContent } from '../InlineContent/InlineContent'; - -export type CardStyle = SurfaceStyle & { - backgroundColor: Color; import { Color, StylePartial } from '../../types/lui'; +import type { TextContent } from '../InlineContent/InlineContent'; type CardStyle = SurfaceStyle & { - backgroundColorDisabled: Color; - backgroundColorFocused: Color; - backgroundColorUnfocused: Color; + backgroundColor: Color; paddingHorizontal: number; paddingVertical: number; radius: lng.Tools.CornerRadius; titleTextStyle: TextBoxStyle; }; - -export default class Card extends Surface { - title?: string | TextContent[]; declare namespace Card { export interface TemplateSpec extends Surface.TemplateSpec { /** * headline of the content */ - title?: string; + title?: string | TextContent[]; } } @@ -54,7 +45,7 @@ declare class Card< /** * headline of the content */ - title?: string; + title?: string | TextContent[]; get style(): CardStyle; set style(v: StylePartial); diff --git a/packages/@lightningjs/ui-components/src/components/Card/CardSection.d.ts b/packages/@lightningjs/ui-components/src/components/Card/CardSection.d.ts index 19989b94c7..bfd847d130 100644 --- a/packages/@lightningjs/ui-components/src/components/Card/CardSection.d.ts +++ b/packages/@lightningjs/ui-components/src/components/Card/CardSection.d.ts @@ -18,9 +18,8 @@ import lng from '@lightningjs/core'; import Card, { CardStyle } from './Card'; -import type { StylePartial } from '../../types/lui'; -import { TextBoxStyle } from '../TextBox'; import { StylePartial } from '../../types/lui'; +import { TextBoxStyle } from '../TextBox'; type CardSectionStyle = CardStyle & { iconHeight: number; @@ -43,21 +42,24 @@ declare namespace CardSection { */ iconWidth?: number; } +} -declare class CardSection extends Card{ - +declare class CardSection< + TemplateSpec extends CardSection.TemplateSpec = CardSection.TemplateSpec, + TypeConfig extends lng.Component.TypeConfig = lng.Component.TypeConfig +> extends Card { // Properties /** - * height of the icon on the right - */ + * height of the icon on the right + */ iconHeight?: number; /** - * icon source - */ + * icon source + */ iconSrc?: number; - /** - * width of the icon on the right - */ + /** + * width of the icon on the right + */ iconWidth?: number; get style(): CardSectionStyle; @@ -65,6 +67,6 @@ declare class CardSection);