forked from apache/superset
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: import theme colors (apache#601)
- Loading branch information
1 parent
1b5aa85
commit 8cc4399
Showing
2 changed files
with
82 additions
and
0 deletions.
There are no files selected for viewing
30 changes: 30 additions & 0 deletions
30
...uperset-ui/packages/superset-ui-demo/storybook/stories/superset-ui-style/ThemeStories.jsx
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import React from 'react'; | ||
|
||
import { supersetTheme } from '@superset-ui/style/src/'; | ||
|
||
export default { | ||
title: 'Core Packages|@superset-ui/style', | ||
}; | ||
|
||
export const ThemeColors = () => { | ||
const colors = supersetTheme.colors; | ||
return Object.keys(colors).map(collection => ( | ||
<div> | ||
<h2>{collection}</h2> | ||
<table style={{ width: '300px' }}> | ||
{Object.keys(colors[collection]).map(k => { | ||
const hex = colors[collection][k]; | ||
return ( | ||
<tr> | ||
<td>{k}</td> | ||
<td> | ||
<code>{hex}</code> | ||
</td> | ||
<td style={{ width: '150px', backgroundColor: hex }}></td> | ||
</tr> | ||
); | ||
})} | ||
</table> | ||
</div> | ||
)); | ||
}; |
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