1
0
mirror of https://github.com/yldio/copilot.git synced 2024-11-14 07:10:05 +02:00

Refactor colours

This commit is contained in:
Tom Gallacher 2016-12-09 15:26:11 +00:00 committed by Sérgio Ramos
parent 90346fd7b4
commit e5e0bd9b6d
3 changed files with 30 additions and 34 deletions

View File

@ -19,32 +19,25 @@ const {
// TODO: this should come from constants // TODO: this should come from constants
// and be calculated accordingly // and be calculated accordingly
const styles = { const styles = {
primaryBackground: colors.brandPrimary,
primaryBorder: '#2532BB', primaryBorder: '#2532BB',
primaryColor: '#FFFFFF',
secondaryBackgroud: '#FFFFFF',
secondaryBorder: '#D8D8D8',
secondaryColor: '#646464', secondaryColor: '#646464',
inactiveBackground: '#F9F9F9',
inactiveBorder: '#D8D8D8',
inactiveColor: '#737373',
...colors ...colors
}; };
const background = match({ const background = match({
secondary: styles.secondaryBackgroud, secondary: styles.background,
inactive: styles.inactiveBackground disabled: styles.inactiveBackground,
}, styles.primaryBackground); }, styles.brandPrimary);
const border = match({ const border = match({
secondary: styles.secondaryBorder, secondary: styles.border,
inactive: styles.inactiveBorder disabled: styles.inactiveBorder
}, styles.primaryBorder); }, styles.primaryBorder);
const color = match({ const color = match({
secondary: styles.secondaryColor, secondary: styles.secondaryColor,
inactive: styles.inactiveColor disabled: styles.inactiveColor
}, styles.primaryColor); }, styles.background);
module.exports = styled.button` module.exports = styled.button`
border-radius: ${remcalc(boxes.borderRadius)}; border-radius: ${remcalc(boxes.borderRadius)};

View File

@ -85,17 +85,20 @@ const forms = {
}; };
const colors = { const colors = {
brandPrimary: '#364acd', brandPrimary: '#364ACD',
brandSecondary: '#160d42', brandSecondary: '#160D42',
grayLight: '#818a91', grayLight: '#818A91',
confirmation: '#38C647', confirmation: '#38C647',
background: '#ffffff', background: '#FFFFFF',
border: '#D8D8D8', border: '#D8D8D8',
borderSelected: '#1D35BC', borderSelected: '#1D35BC',
warning: '#e4a800', warning: '#E4A800',
warningLight: '#fffaed', warningLight: '#FFFAED',
alert: '#D0011B', alert: '#D0011B',
alertLight: '#ffc7c7' alertLight: '#FFC7C7',
inactiveBackground: '#F9F9F9',
inactiveBorder: '#D8D8D8',
inactiveColor: '#737373',
}; };
const typography = { const typography = {

View File

@ -129,6 +129,19 @@ storiesOf('Checkbox', module)
<Checkbox disabled /> <Checkbox disabled />
)); ));
storiesOf('Radio', module)
.add('Default', () => (
<Radio>
Video killed the radio star
</Radio>
))
.add('Checked', () => (
<Radio checked onChange={function noop() {}} />
))
.add('Disabled', () => (
<Radio disabled />
));
storiesOf('Tabs', module) storiesOf('Tabs', module)
.add('Default', () => ( .add('Default', () => (
<Tabs name='my-tab-group'> <Tabs name='my-tab-group'>
@ -162,16 +175,3 @@ storiesOf('Widget', module)
<p>Some text</p> <p>Some text</p>
</Widget> </Widget>
)) ))
storiesOf('Radio', module)
.add('Default', () => (
<Radio>
Video killed the radio star
</Radio>
))
.add('Checked', () => (
<Radio checked onChange={function noop() {}} />
))
.add('Disabled', () => (
<Radio disabled />
));