-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7819395
commit 4d71cb9
Showing
13 changed files
with
9,958 additions
and
19 deletions.
There are no files selected for viewing
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
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
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
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
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
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,5 @@ | ||
module.exports = { | ||
stories: [ | ||
'../src/**/*.stories.tsx', | ||
], | ||
}; |
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
62 changes: 62 additions & 0 deletions
62
ui/design-tokens/src/Colors/ETradeColor/ETradeColor.stories.tsx
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,62 @@ | ||
import React from 'react'; | ||
import { ETradeColor, ETradeColorPalette } from './ETradeColor'; | ||
import { ColorProps } from '../types'; | ||
|
||
export default { | ||
title: 'Design Tokens/Colors/ETradeColor', | ||
component: ETradeColor, | ||
}; | ||
|
||
export const overview = ({ name, color }: ColorProps) => ( | ||
<ETradeColor name={name} color={color} /> | ||
); | ||
|
||
overview.controls = { | ||
name: { type: 'text', value: 'Negative red' }, | ||
color: { | ||
type: 'object', | ||
value: { | ||
value: { type: 'color', value: '#cc0000' }, | ||
name: 'Error state', | ||
description: 'Data trending down', | ||
sass: '$negative', | ||
}, | ||
}, | ||
}; | ||
|
||
export const palette = () => ( | ||
<ETradeColorPalette | ||
palette={{ | ||
Purple: { | ||
value: '#5627d8', | ||
description: 'Text links and other interactive elements', | ||
sass: '$link-color', | ||
}, | ||
'Negative red': { | ||
value: '#cc0000', | ||
name: 'Error state', | ||
description: 'Data trending down', | ||
sass: '$negative', | ||
}, | ||
'Positive green': { | ||
value: '#107a1b', | ||
name: 'Success state', | ||
description: 'Data trending up', | ||
sass: '$positive', | ||
css: '.text-positive', | ||
}, | ||
'Body gray': { | ||
value: '#242424', | ||
description: 'Headers and body text', | ||
sass: '$body-text-color', | ||
css: '.body-text-color', | ||
}, | ||
'Background accent color': { | ||
value: '#f1ecff', | ||
description: 'Background color', | ||
sass: '$background-accent-color-1', | ||
css: '.background-accent-color-1', | ||
}, | ||
}} | ||
/> | ||
); |
Oops, something went wrong.