Skip to content

Commit

Permalink
fix(Card): updates imports and descriptions
Browse files Browse the repository at this point in the history
  • Loading branch information
arwehrman committed Aug 1, 2023
1 parent b7fa013 commit 75b2274
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -34,7 +33,7 @@ declare namespace Card {
/**
* headline of the content
*/
title?: string | TextContent[];
title?: string | TextBox[];
}
}

Expand All @@ -45,7 +44,7 @@ declare class Card<
/**
* headline of the content
*/
title?: string | TextContent[];
title?: string | TextBox[];

get style(): CardStyle;
set style(v: StylePartial<CardStyle>);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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<
Expand All @@ -45,12 +44,13 @@ declare class CardRadio<
> extends CardTitle<TemplateSpec, TypeConfig> {
/**
* Object containing all properties supported in the Radio Component
* TODO: See if the types can be updated when Radio has been updated
*/
radio?: Record<string, unknown>;
/**
* text to be displayed in the subtitle section of the card
*/
subtitle?: string | TextContent[];
subtitle?: string | TextBox[];

get style(): CardRadioStyle;
set style(v: StylePartial<CardRadioStyle>);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ declare namespace CardSection {
/**
* icon source
*/
iconSrc?: number;
iconSrc?: string;
/**
* width of the icon on the right
*/
Expand All @@ -56,7 +56,7 @@ declare class CardSection<
/**
* icon source
*/
iconSrc?: number;
iconSrc?: string;
/**
* width of the icon on the right
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 & {
Expand All @@ -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[];
}
}

Expand All @@ -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<CardTitleStyle>);
Expand Down

0 comments on commit 75b2274

Please sign in to comment.