-
Notifications
You must be signed in to change notification settings - Fork 41
/
Copy paththeme.js
55 lines (47 loc) · 1.55 KB
/
theme.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
import { create } from "@storybook/theming/create";
import logo from "./static/logo.png";
import { getCSSVarValue } from "../packages/shared/styles/styleUtils/typography/color";
import {
borderRadiusDefault,
fontFamilyMonospace,
fontFamilySansSerif,
themeBgPrimary,
themeBorder,
themeBrandPrimary,
themeBgSecondary,
themeTextColorDisabled,
themeTextColorPrimary,
themeTextColorPrimaryInverted
} from "../packages/design-tokens/build/js/designTokens";
export default create({
base: "light",
// Brand
brandTitle: "D2iQ UI Kit",
brandUrl: "./",
brandImage: logo,
brandTarget: "_self",
// Typography
fontBase: fontFamilySansSerif,
fontCode: fontFamilyMonospace,
// Main Colors
colorPrimary: getCSSVarValue(themeBrandPrimary),
colorSecondary: getCSSVarValue(themeBrandPrimary),
// Text Colors
textColor: getCSSVarValue(themeTextColorPrimary),
textInverseColor: getCSSVarValue(themeTextColorPrimaryInverted),
textMutedColor: getCSSVarValue(themeTextColorDisabled),
// App Styles
appBg: getCSSVarValue(themeBgPrimary),
appContentBg: getCSSVarValue(themeBgSecondary),
appBorderColor: getCSSVarValue(themeBorder),
appBorderRadius: borderRadiusDefault,
// Toolbar Colors
barTextColor: getCSSVarValue(themeTextColorPrimary),
barSelectedColor: getCSSVarValue(themeBrandPrimary),
barBg: getCSSVarValue(themeBgPrimary),
// Form Styles
inputBg: getCSSVarValue(themeBgPrimary),
inputBorder: getCSSVarValue(themeBorder),
inputTextColor: getCSSVarValue(themeTextColorPrimary),
inputBorderRadius: borderRadiusDefault
});