Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(devui): upgrade storybook (#626)
* stash * stash * stash * fix * stash * fix css * stash * stash * stash * Fix tests
- Loading branch information
1 parent
c7b0c7a
commit cd4f022
Showing
51 changed files
with
3,400 additions
and
2,478 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
module.exports = { | ||
stories: ['../src/**/*.stories.mdx', '../src/**/*.stories.@(js|jsx|ts|tsx)'], | ||
addons: [ | ||
{ | ||
name: '@storybook/addon-essentials', | ||
options: { | ||
backgrounds: false, | ||
}, | ||
}, | ||
], | ||
}; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
import React from 'react'; | ||
import { Container } from '../src'; | ||
import { listSchemes, listThemes } from '../src/utils/theme'; | ||
import '../src/presets.js'; | ||
|
||
export const parameters = { | ||
actions: { argTypesRegex: '^on[A-Z].*' }, | ||
}; | ||
|
||
export const globalTypes = { | ||
theme: { | ||
name: 'Theme', | ||
description: 'Global theme for components', | ||
defaultValue: 'default', | ||
toolbar: { | ||
items: listThemes(), | ||
}, | ||
}, | ||
scheme: { | ||
name: 'Color Scheme', | ||
description: 'Global color scheme for components', | ||
defaultValue: 'default', | ||
toolbar: { | ||
items: listSchemes(), | ||
}, | ||
}, | ||
color: { | ||
name: 'Color', | ||
description: 'Global color for components', | ||
defaultValue: 'light', | ||
toolbar: { | ||
items: ['light', 'dark'], | ||
}, | ||
}, | ||
}; | ||
|
||
const withThemeProvider = (Story, context) => ( | ||
<Container | ||
themeData={{ | ||
theme: context.globals.theme, | ||
scheme: context.globals.scheme, | ||
light: context.globals.color === 'light', | ||
}} | ||
> | ||
<Story {...context} /> | ||
</Container> | ||
); | ||
export const decorators = [withThemeProvider]; |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.