Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: storybook theming exploration #425

Merged
merged 29 commits into from
Apr 15, 2024
Merged
Show file tree
Hide file tree
Changes from 23 commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
7d36d54
feat: storybook customisation
ergusto Apr 9, 2024
cd368a6
feat: improved storybook themeing
ergusto Apr 9, 2024
75cfb51
chore: remove website directory from unrelated branch
ergusto Apr 9, 2024
5e48043
feat: install storybook test runner and add corresponding github work…
ergusto Apr 5, 2024
52c0818
chore(deps-dev): bump @storybook/blocks from 8.0.5 to 8.0.6 (#419)
dependabot[bot] Apr 8, 2024
40cfce5
chore(deps-dev): bump typescript from 5.4.2 to 5.4.4 (#420)
dependabot[bot] Apr 8, 2024
81e202d
chore(deps-dev): bump @babel/preset-env from 7.24.3 to 7.24.4 (#424)
dependabot[bot] Apr 8, 2024
746f3e2
chore(deps-dev): bump @storybook/react from 8.0.1 to 8.0.6 (#421)
dependabot[bot] Apr 8, 2024
a02134a
chore(deps-dev): bump @storybook/addon-links from 8.0.1 to 8.0.6 (#422)
dependabot[bot] Apr 8, 2024
9035429
feat: storybook customisation
ergusto Apr 9, 2024
0d02d43
feat: install storybook test runner and add corresponding github work…
ergusto Apr 5, 2024
ca0e7d6
chore(deps-dev): bump @storybook/react from 8.0.1 to 8.0.6 (#421)
dependabot[bot] Apr 8, 2024
a64845c
feat: storybook customisation
ergusto Apr 9, 2024
64047e7
feat: install storybook test runner and add corresponding github work…
ergusto Apr 5, 2024
cd4c828
feat: storybook customisation
ergusto Apr 9, 2024
2943045
feat: install storybook test runner and add corresponding github work…
ergusto Apr 5, 2024
bd3ba1e
chore(deps-dev): bump @storybook/blocks from 8.0.5 to 8.0.6 (#419)
dependabot[bot] Apr 8, 2024
94330e3
chore(deps-dev): bump @storybook/react from 8.0.1 to 8.0.6 (#421)
dependabot[bot] Apr 8, 2024
bd8c69c
feat: storybook customisation
ergusto Apr 9, 2024
29ab9b4
feat: storybook customisation
ergusto Apr 9, 2024
b51c6b5
feat: storybook customisation
ergusto Apr 11, 2024
8e26b2f
Merge branch 'main' into feat/storybook-themeing
ergusto Apr 11, 2024
336651a
feat: slightly improved spacing in storybook docs
ergusto Apr 11, 2024
4c152c5
fix: deps
ergusto Apr 12, 2024
4813476
fix: deps
ergusto Apr 12, 2024
29b505c
fix: deps
ergusto Apr 12, 2024
e018f8d
fix: linting
ergusto Apr 12, 2024
e98bca3
Revert "fix: linting"
ergusto Apr 12, 2024
edab058
fix: linting
ergusto Apr 12, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{
"semi": false,
"singleQuote": true,
"arrowParens": "avoid",
"trailingComma": "none"
Expand Down
30 changes: 0 additions & 30 deletions .storybook/DocsContainer.tsx

This file was deleted.

Empty file added .storybook/colors.ts
Empty file.
15 changes: 8 additions & 7 deletions .storybook/main.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as path from 'path'
import type { StorybookConfig } from '@storybook/react-vite'
import * as path from 'path';
import type { StorybookConfig } from '@storybook/react-vite';

const config: StorybookConfig = {
stories: [
Expand All @@ -10,12 +10,13 @@ const config: StorybookConfig = {
'@storybook/addon-links',
'@storybook/addon-essentials',
'@storybook/addon-interactions',
'storybook-dark-mode'
'@storybook/addon-mdx-gfm'
],
framework: {
name: '@storybook/react-vite',
options: {}
},
staticDirs: ['../public/'],
docs: {
autodocs: 'tag'
},
Expand All @@ -24,10 +25,10 @@ const config: StorybookConfig = {
config.resolve.alias = {
...config.resolve.alias,
'@': path.join(__dirname, '../src')
}
};
}

return config
return config;
}
}
export default config
};
export default config;
7 changes: 6 additions & 1 deletion .storybook/manager-head.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@100;200;300;400;500;600;700;800;900&display=swap"
rel="stylesheet" />
<link href="/manager.css" rel="stylesheet" />
<style>
iframe#storybook-preview-iframe {
background-color: transparent;
}
</style>
</style>
7 changes: 3 additions & 4 deletions .storybook/preview-head.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link
href="https://fonts.googleapis.com/css2?family=Inter:wght@100;200;300;400;500;600;700;800;900&display=swap"
rel="stylesheet"
/>
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@100;200;300;400;500;600;700;800;900&display=swap"
rel="stylesheet" />
<link href="/preview.css" rel="stylesheet" />
31 changes: 18 additions & 13 deletions .storybook/preview.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,20 @@
import { DocsContainer } from './DocsContainer'
import { themes } from '@storybook/theming'
import './global.css';
import { Preview } from '@storybook/react';
import theme from './theme';

import './global.css'

export const parameters = {
backgrounds: { disable: true },
darkMode: {
dark: { ...themes.dark },
light: { ...themes.normal }
},
docs: {
container: DocsContainer
const preview: Preview = {
parameters: {
backgrounds: { disable: true },
docs: {
theme,
toc: true
},
options: {
storySort: {
order: ['Get Started']
}
}
}
}
};

export default preview;
37 changes: 34 additions & 3 deletions .storybook/theme.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,37 @@
import { create } from '@storybook/theming/create'
import { create } from '@storybook/theming/create';
import colors from '../src/colors';

export default create({
base: 'light',
brandTitle: 'NearForm Quantum'
})
brandTitle: 'Quantum',
brandImage: '/quantum-logo-light.png',

fontBase: 'Inter',

appBg: colors.white.DEFAULT,

colorPrimary: '#000E38',
colorSecondary: '#0C3D60',

// UI
appContentBg: '#ffffff',
appPreviewBg: '#ffffff',
appBorderColor: '#D1D5DB',
appBorderRadius: 4,

// Text colors
textColor: '#111928',
textInverseColor: '#111928',

// Toolbar default and active colors
barTextColor: '#fff',
barHoverColor: '#7EDCE2',
barSelectedColor: '#7EDCE2',
barBg: '#000E38',

// Form colors
inputBg: '#ffffff',
inputBorder: '#97A1B8',
inputTextColor: '#111928',
inputBorderRadius: 2
});
Loading
Loading