Created
May 31, 2023 18:51
-
-
Save mediawrangler/d58a4b748ff54a48643955cb9b79ce85 to your computer and use it in GitHub Desktop.
Suggested Type Definitions for SDK List Component
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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