feat: import theme colors (#601)

This commit is contained in:
Maxime Beauchemin 2020-06-15 15:40:31 -07:00 committed by Yongjie Zhao
parent 1b5aa858a7
commit 8cc4399815
2 changed files with 82 additions and 0 deletions

View File

@ -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>
));
};

View File

@ -25,6 +25,13 @@ const defaultTheme = {
colors: {
primary: {
base: '#20A7C9',
dark1: '#1A85A0',
dark2: '#156378',
light1: '#79CADE',
light2: '#A5DAE9',
light3: '#D2EDF4',
light4: '#E9F6F9',
light5: '#F3F8FA',
},
secondary: {
base: '#444E7C',
@ -37,6 +44,51 @@ const defaultTheme = {
light4: '#ECEEF2',
light5: '#F5F5F8',
},
grayscale: {
base: '#666666',
dark1: '#323232',
dark2: '#000000',
light1: '#B2B2B2',
light2: '#E0E0E0',
light3: '#F0F0F0',
light4: '#F7F7F7',
light5: '#FFFFFF',
},
error: {
base: '#E04355',
dark1: '#A7323F',
dark2: '#6F212A',
light1: '#EFA1AA',
light2: '#FAEDEE',
},
warning: {
base: '#FF7F44',
dark1: '#BF5E33',
dark2: '#7F3F21',
light1: '#FEC0A1',
light2: '#FFF2EC',
},
alert: {
base: '#FCC700',
dark1: '#BC9501',
dark2: '#7D6300',
light1: '#FDE380',
light2: '#FEF9E6',
},
success: {
base: '#5AC189',
dark1: '#439066',
dark2: '#2B6144',
light1: '#ACE1C4',
light2: '#EEF8F3',
},
info: {
base: '#66BCFE',
dark1: '#4D8CBE',
dark2: '#315E7E',
light1: '#B3DEFE',
light2: '#EFF8FE',
},
},
typography: {
families: {