diff options
author | August Skare <post@augustskare.no> | 2018-10-25 19:10:35 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-25 19:10:35 +0800 |
commit | 1ae9f68db8c9768e68d1eab1f411b346e9512c1c (patch) | |
tree | ed13286ad8d4b60cf5bffac2182328baa0367f02 /packages/dev-tools-pages/ts/components | |
parent | e5d3e3b33a88e2b08ed02cb39910fab28e130594 (diff) | |
download | dexon-0x-contracts-1ae9f68db8c9768e68d1eab1f411b346e9512c1c.tar dexon-0x-contracts-1ae9f68db8c9768e68d1eab1f411b346e9512c1c.tar.gz dexon-0x-contracts-1ae9f68db8c9768e68d1eab1f411b346e9512c1c.tar.bz2 dexon-0x-contracts-1ae9f68db8c9768e68d1eab1f411b346e9512c1c.tar.lz dexon-0x-contracts-1ae9f68db8c9768e68d1eab1f411b346e9512c1c.tar.xz dexon-0x-contracts-1ae9f68db8c9768e68d1eab1f411b346e9512c1c.tar.zst dexon-0x-contracts-1ae9f68db8c9768e68d1eab1f411b346e9512c1c.zip |
Content (#7)
* optional children in List component
* added real content to trace page
* added real content to cov page
* add support for json highlighting
* real content on compiler page
* real content on profiler page
* remove unused import
* remove list from compiler page
* wrap code components in pages with breakout component
* fix font size on text
* fix typo
Diffstat (limited to 'packages/dev-tools-pages/ts/components')
-rw-r--r-- | packages/dev-tools-pages/ts/components/List.tsx | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/packages/dev-tools-pages/ts/components/List.tsx b/packages/dev-tools-pages/ts/components/List.tsx index 3041fc475..ceb3bc108 100644 --- a/packages/dev-tools-pages/ts/components/List.tsx +++ b/packages/dev-tools-pages/ts/components/List.tsx @@ -26,14 +26,19 @@ const StyledItem = styled.li` `; interface ListProps { - items: Array<string>; + items?: Array<string>; + children?: React.ReactNode; } function List(props: ListProps) { - const items = props.items; - const listItems = items.map((bullet, index) => <StyledItem key={index}>{bullet}</StyledItem>); - - return <StyledList>{listItems}</StyledList>; + return ( + <StyledList> + {props.children !== undefined + ? props.children + : props.items.map((bullet, index) => <StyledItem key={index}>{bullet}</StyledItem>)} + </StyledList> + ); } export default List; +export { List, StyledItem as ListItem }; |