Skip to content

Instantly share code, notes, and snippets.

@mediawrangler
Created May 31, 2023 18:51
Show Gist options
  • Save mediawrangler/d58a4b748ff54a48643955cb9b79ce85 to your computer and use it in GitHub Desktop.
Save mediawrangler/d58a4b748ff54a48643955cb9b79ce85 to your computer and use it in GitHub Desktop.
Suggested Type Definitions for SDK List Component
export interface ListProps {
list: List;
}
export type List = DefaultList | DescriptionList | OrderedList | DecoratedList;
export interface DefaultList {
listItems: ListItem[];
};
export interface DescriptionList {
descriptionListItems: DescriptionListItem[];
};
export interface OrderedList {
orderedListItems: ListItem[];
};
export interface DecoratedList {
decoratedListItems: DecoratedListItem[];
iconSize?: SizeProp;
};
export interface ListItem {
text: string;
textStyle?: TypographyTextStyle;
blocks?: Block[];
};
export interface DescriptionListItem extends ListItem {
header: string;
headerStyle?: HeaderStyle;
};
export interface DecoratedListItem extends ListItem {
icon: IconName;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment