From fa049a36f18b1018cb8d5b364de8e5564f3b16ec Mon Sep 17 00:00:00 2001 From: Mandy Wehrman Date: Tue, 1 Aug 2023 14:12:39 -0400 Subject: [PATCH] fix(Card): updates imports and descriptions --- .../ui-components/src/components/Card/Card.d.ts | 7 +++---- .../src/components/Card/CardRadio.d.ts | 8 ++++---- .../src/components/Card/CardSection.d.ts | 4 ++-- .../src/components/Card/CardTitle.d.ts | 15 +++++++-------- 4 files changed, 16 insertions(+), 18 deletions(-) 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 635741d442..8a434f38d9 100644 --- a/packages/@lightningjs/ui-components/src/components/Card/Card.d.ts +++ b/packages/@lightningjs/ui-components/src/components/Card/Card.d.ts @@ -18,9 +18,8 @@ import type lng from '@lightningjs/core'; import Surface, { SurfaceStyle } from '../Surface'; -import { TextBoxStyle } from '../TextBox'; +import TextBox, { TextBoxStyle } from '../TextBox'; import { Color, StylePartial } from '../../types/lui'; -import type { TextContent } from '../InlineContent/InlineContent'; type CardStyle = SurfaceStyle & { backgroundColor: Color; @@ -34,7 +33,7 @@ declare namespace Card { /** * headline of the content */ - title?: string | TextContent[]; + title?: string | TextBox[]; } } @@ -45,7 +44,7 @@ declare class Card< /** * headline of the content */ - title?: string | TextContent[]; + title?: string | TextBox[]; get style(): CardStyle; set style(v: StylePartial); diff --git a/packages/@lightningjs/ui-components/src/components/Card/CardRadio.d.ts b/packages/@lightningjs/ui-components/src/components/Card/CardRadio.d.ts index d78d2d3815..31105fe3e2 100644 --- a/packages/@lightningjs/ui-components/src/components/Card/CardRadio.d.ts +++ b/packages/@lightningjs/ui-components/src/components/Card/CardRadio.d.ts @@ -18,9 +18,8 @@ import lng from '@lightningjs/core'; import { StylePartial } from '../../types/lui'; -import { TextBoxStyle } from '../TextBox'; +import TextBox, { TextBoxStyle } from '../TextBox'; import CardTitle, { CardTitleStyle } from './CardTitle'; -import { TextContent } from '../InlineContent/InlineContent'; type CardRadioStyle = CardTitleStyle & { descriptionTextStyle: TextBoxStyle; @@ -36,7 +35,7 @@ declare namespace CardRadio { /** * text to be displayed in the subtitle section of the card */ - subtitle?: string | TextContent[]; + subtitle?: string | TextBox[]; } } declare class CardRadio< @@ -45,12 +44,13 @@ declare class CardRadio< > extends CardTitle { /** * Object containing all properties supported in the Radio Component + * TODO: See if the types can be updated when Radio has been updated */ radio?: Record; /** * text to be displayed in the subtitle section of the card */ - subtitle?: string | TextContent[]; + subtitle?: string | TextBox[]; get style(): CardRadioStyle; 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 bfd847d130..e9ed2af9e1 100644 --- a/packages/@lightningjs/ui-components/src/components/Card/CardSection.d.ts +++ b/packages/@lightningjs/ui-components/src/components/Card/CardSection.d.ts @@ -36,7 +36,7 @@ declare namespace CardSection { /** * icon source */ - iconSrc?: number; + iconSrc?: string; /** * width of the icon on the right */ @@ -56,7 +56,7 @@ declare class CardSection< /** * icon source */ - iconSrc?: number; + iconSrc?: string; /** * width of the icon on the right */ diff --git a/packages/@lightningjs/ui-components/src/components/Card/CardTitle.d.ts b/packages/@lightningjs/ui-components/src/components/Card/CardTitle.d.ts index 85399390ca..51953cebcb 100644 --- a/packages/@lightningjs/ui-components/src/components/Card/CardTitle.d.ts +++ b/packages/@lightningjs/ui-components/src/components/Card/CardTitle.d.ts @@ -18,8 +18,7 @@ import lng from '@lightningjs/core'; import Card, { CardStyle } from './Card'; -import { TextBoxStyle } from '../TextBox'; -import { TextContent } from '../InlineContent/InlineContent'; +import TextBox, { TextBoxStyle } from '../TextBox'; import { StylePartial } from '../../types/lui'; type CardTitleStyle = CardStyle & { @@ -30,13 +29,13 @@ type CardTitleStyle = CardStyle & { declare namespace CardTitle { export interface TemplateSpec extends Card.TemplateSpec { /** - * description??? + * text to be displayed in the description section */ - description?: string | TextContent[]; + description?: string | TextBox[]; /** - * details?? + * text to be displayed in the details section */ - details?: string | TextContent[]; + details?: string | TextBox[]; } } @@ -47,11 +46,11 @@ declare class CardTitle< /** * text to be displayed in the description section */ - description?: string | TextContent[]; + description?: string | TextBox[]; /** * text to be displayed in the details section */ - details?: string | TextContent[]; + details?: string | TextBox[]; get style(): CardTitleStyle; set style(v: StylePartial);