diff options
author | fragosti <francesco.agosti93@gmail.com> | 2018-10-04 05:08:08 +0800 |
---|---|---|
committer | fragosti <francesco.agosti93@gmail.com> | 2018-10-04 05:08:08 +0800 |
commit | 700b7068a157a0f9d3d6ce3f61150c2961d81617 (patch) | |
tree | 3e8d7df053ef2f3285bbcc5e45f2855a7853ee9b /packages/instant/src | |
parent | bce43a0050056195acb9c4890f57526985268da9 (diff) | |
download | dexon-0x-contracts-700b7068a157a0f9d3d6ce3f61150c2961d81617.tar.gz dexon-0x-contracts-700b7068a157a0f9d3d6ce3f61150c2961d81617.tar.zst dexon-0x-contracts-700b7068a157a0f9d3d6ce3f61150c2961d81617.zip |
Add styled-components with theme
Diffstat (limited to 'packages/instant/src')
-rw-r--r-- | packages/instant/src/components/zero_ex_instant.tsx | 8 | ||||
-rw-r--r-- | packages/instant/src/style/theme.ts | 27 |
2 files changed, 34 insertions, 1 deletions
diff --git a/packages/instant/src/components/zero_ex_instant.tsx b/packages/instant/src/components/zero_ex_instant.tsx index 67e1b683d..43398cf3b 100644 --- a/packages/instant/src/components/zero_ex_instant.tsx +++ b/packages/instant/src/components/zero_ex_instant.tsx @@ -1,5 +1,11 @@ import * as React from 'react'; +import { ThemeProvider } from '../style/theme'; + export interface ZeroExInstantProps {} -export const ZeroExInstant: React.StatelessComponent<ZeroExInstantProps> = () => <div>ZeroExInstant</div>; +export const ZeroExInstant: React.StatelessComponent<ZeroExInstantProps> = () => ( + <ThemeProvider> + <div> ZeroExInstant </div> + </ThemeProvider> +); diff --git a/packages/instant/src/style/theme.ts b/packages/instant/src/style/theme.ts new file mode 100644 index 000000000..838378c99 --- /dev/null +++ b/packages/instant/src/style/theme.ts @@ -0,0 +1,27 @@ +import * as styledComponents from 'styled-components'; + +const { + default: styled, + css, + injectGlobal, + keyframes, + ThemeProvider, +} = styledComponents as styledComponents.ThemedStyledComponentsModule<IThemeInterface>; + +export interface IThemeInterface { + primaryColor: string; + black: string; + white: string; + darkGrey: string; + lightGrey: string; +} + +export const theme: IThemeInterface = { + primaryColor: '#512D80', + black: 'black', + lightGrey: '#999999', + darkGrey: '#333333', + white: 'white', +}; + +export { styled, css, injectGlobal, keyframes, ThemeProvider }; |