|
| 1 | +import { create, themes, type ThemeVars } from "@storybook/theming" |
| 2 | +import { type Theme } from "./constants" |
| 3 | + |
| 4 | +const light = create({ |
| 5 | + base: "light", |
| 6 | + // Logo |
| 7 | + brandTitle: "Apps SDK UI", |
| 8 | + brandImage: "https://openai.github.io/apps-sdk-ui/logo-storybook.svg", |
| 9 | + brandUrl: "https://developers.openai.com", |
| 10 | + brandTarget: "_self", |
| 11 | + |
| 12 | + // Typography |
| 13 | + fontBase: `ui-sans-serif, -apple-system, system-ui, "Segoe UI", "Noto Sans", "Helvetica", |
| 14 | + "Arial", "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", sans-serif`, |
| 15 | + fontCode: `ui-monospace, "SFMono-Regular", "SF Mono", "Menlo", "Monaco", "Consolas", |
| 16 | + "Liberation Mono", "DejaVu Sans Mono", "Courier New", monospace`, |
| 17 | + |
| 18 | + // Variables |
| 19 | + colorPrimary: "#3A10E5", |
| 20 | + colorSecondary: "#585C6D", |
| 21 | + |
| 22 | + // UI |
| 23 | + appBg: "#ffffff", |
| 24 | + appContentBg: "#ffffff", |
| 25 | + appPreviewBg: "#ffffff", |
| 26 | + appBorderColor: "#ededed", |
| 27 | + appBorderRadius: 6, |
| 28 | + |
| 29 | + // Toolbar default and active colors |
| 30 | + barTextColor: "#6e6e80", |
| 31 | + barBg: "#ffffff", |
| 32 | +}) |
| 33 | + |
| 34 | +const dark = create({ |
| 35 | + ...themes.dark, |
| 36 | + // Logo |
| 37 | + brandTitle: "Apps SDK UI", |
| 38 | + brandImage: "https://openai.github.io/apps-sdk-ui/logo-storybook-dark.svg", |
| 39 | + brandUrl: "https://platform.openai.com", |
| 40 | + brandTarget: "_self", |
| 41 | + |
| 42 | + // Typography |
| 43 | + fontBase: `ui-sans-serif, -apple-system, system-ui, "Segoe UI", "Noto Sans", "Helvetica", |
| 44 | + "Arial", "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", sans-serif`, |
| 45 | + fontCode: `ui-monospace, "SFMono-Regular", "SF Mono", "Menlo", "Monaco", "Consolas", |
| 46 | + "Liberation Mono", "DejaVu Sans Mono", "Courier New", monospace`, |
| 47 | + |
| 48 | + // Variables |
| 49 | + colorPrimary: "#3A10E5", |
| 50 | + colorSecondary: "#585C6D", |
| 51 | + |
| 52 | + // UI |
| 53 | + appBg: "#212121", |
| 54 | + appContentBg: "#212121", |
| 55 | + appPreviewBg: "#212121", |
| 56 | + appBorderColor: "#393939", |
| 57 | + appBorderRadius: 6, |
| 58 | + |
| 59 | + // Toolbar default and active colors |
| 60 | + barTextColor: "#c1c1c1", |
| 61 | + barBg: "#212121", |
| 62 | +}) |
| 63 | + |
| 64 | +export const THEMES: Record<Theme, ThemeVars> = { |
| 65 | + light, |
| 66 | + dark, |
| 67 | +} |
0 commit comments