Skip to content

Commit b22a8a5

Browse files
committed
Adjust storybook
1 parent 946c9d0 commit b22a8a5

File tree

5 files changed

+21
-4
lines changed

5 files changed

+21
-4
lines changed

.storybook/config.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,20 @@
11
import 'storybook-chromatic'
2-
32
import React from 'react'
43
import { configure, addDecorator, addParameters } from '@storybook/react'
54
import { withA11y } from '@storybook/addon-a11y'
5+
import { themes } from '@storybook/theming';
66
import { ThemeProvider } from '@material-ui/styles'
7-
import theme from '../src/_theme'
7+
8+
9+
import docsTheme from './theme'
10+
import appTheme from '../src/_theme'
811

912
// import { GlobalStyle } from '../src/components/shared/global';
1013

1114
addParameters({
1215
options: {
1316
showRoots: true,
17+
theme: docsTheme,
1418
storySort: (a, b) => {
1519
const aNestingLevel = a[1].parameters.fileName.split('/').length
1620
const bNestingLevel = b[1].parameters.fileName.split('/').length
@@ -23,7 +27,7 @@ addParameters({
2327
addDecorator(withA11y);
2428
addDecorator(story => (
2529
<>
26-
<ThemeProvider theme={theme}>
30+
<ThemeProvider theme={appTheme}>
2731
{story()}
2832
</ThemeProvider>
2933
</>

.storybook/theme.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import { create } from '@storybook/theming/create';
2+
import logo from '../public/logo-storybook.png';
3+
4+
5+
export default create({
6+
base: 'light',
7+
brandTitle: 'Modular Material Admin + React',
8+
// brandUrl: 'https://modular-admin.com',
9+
brandImage: logo,
10+
});

public/logo-storybook.png

10.5 KB
Loading

public/logo.svg

Lines changed: 1 addition & 0 deletions
Loading

src/App.stories.mdx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
<Meta title="General/Intro" />
22

33

4-
# Get started
4+
# Modular Material Admin + React
5+
6+
> React dashboard application starter

0 commit comments

Comments
 (0)