diff options
author | fragosti <francesco.agosti93@gmail.com> | 2018-10-04 07:20:39 +0800 |
---|---|---|
committer | fragosti <francesco.agosti93@gmail.com> | 2018-10-04 07:20:39 +0800 |
commit | 4b8348da8cc50ef0da6e6b2bb7d276f1246437cf (patch) | |
tree | 2d09a607c1d0fe875b233c7bad72743f159fa338 /packages/instant/src/style | |
parent | 48e7aa6e77a71f694f75ab8b2fc86f337700113d (diff) | |
download | dexon-sol-tools-4b8348da8cc50ef0da6e6b2bb7d276f1246437cf.tar dexon-sol-tools-4b8348da8cc50ef0da6e6b2bb7d276f1246437cf.tar.gz dexon-sol-tools-4b8348da8cc50ef0da6e6b2bb7d276f1246437cf.tar.bz2 dexon-sol-tools-4b8348da8cc50ef0da6e6b2bb7d276f1246437cf.tar.lz dexon-sol-tools-4b8348da8cc50ef0da6e6b2bb7d276f1246437cf.tar.xz dexon-sol-tools-4b8348da8cc50ef0da6e6b2bb7d276f1246437cf.tar.zst dexon-sol-tools-4b8348da8cc50ef0da6e6b2bb7d276f1246437cf.zip |
Add some ui components
Diffstat (limited to 'packages/instant/src/style')
-rw-r--r-- | packages/instant/src/style/fonts.ts | 10 | ||||
-rw-r--r-- | packages/instant/src/style/theme.ts | 23 |
2 files changed, 19 insertions, 14 deletions
diff --git a/packages/instant/src/style/fonts.ts b/packages/instant/src/style/fonts.ts new file mode 100644 index 000000000..975a30a61 --- /dev/null +++ b/packages/instant/src/style/fonts.ts @@ -0,0 +1,10 @@ +import { injectGlobal } from './theme'; + +export const fonts = { + include: () => { + // Inject the inter-ui font into the page + return injectGlobal` + @import url('https://rsms.me/inter/inter-ui.css'); + `; + }, +}; diff --git a/packages/instant/src/style/theme.ts b/packages/instant/src/style/theme.ts index 0af233db2..3bced9071 100644 --- a/packages/instant/src/style/theme.ts +++ b/packages/instant/src/style/theme.ts @@ -6,29 +6,24 @@ const { injectGlobal, keyframes, ThemeProvider, -} = styledComponents as styledComponents.ThemedStyledComponentsModule<IThemeInterface>; +} = styledComponents as styledComponents.ThemedStyledComponentsModule<Theme>; -// Inject the inter-ui font into the page -styledComponents.injectGlobal` - @import url('https://rsms.me/inter/inter-ui.css'); -`; +export type Theme = { [key in ColorOption]: string }; -export interface IThemeInterface { - primaryColor: string; - black: string; - white: string; - darkGrey: string; - lightGrey: string; - fontFamily: string; +export enum ColorOption { + primaryColor = 'primaryColor', + black = 'black', + lightGrey = 'lightGrey', + darkGrey = 'darkGrey', + white = 'white', } -export const theme: IThemeInterface = { +export const theme: Theme = { primaryColor: '#512D80', black: 'black', lightGrey: '#999999', darkGrey: '#333333', white: 'white', - fontFamily: 'Inter UI, sans-serif', }; export { styled, css, injectGlobal, keyframes, ThemeProvider }; |