This repository has been archived by the owner on Jun 5, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #136 from 5app/try-out-storybook
chore: Migrate from Docz to Storybook, #135
- Loading branch information
Showing
166 changed files
with
29,735 additions
and
84,413 deletions.
There are no files selected for viewing
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
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
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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
dist | ||
node_modules | ||
storybook-static | ||
/test/coverage | ||
.DS_Store | ||
|
||
.docz/** | ||
yarn-error.log |
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 |
---|---|---|
@@ -1,3 +1,7 @@ | ||
/* | ||
!/src | ||
!/test/*.js | ||
package-lock.json | ||
CHANGELOG.md | ||
|
||
*.html | ||
*.scss | ||
*.css | ||
*.yml |
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,37 @@ | ||
import {createGlobalStyle} from 'styled-components'; | ||
|
||
const GlobalStyles = createGlobalStyle` | ||
* { | ||
box-sizing: border-box; | ||
} | ||
*:focus:not(:focus-visible) { | ||
outline: none; | ||
} | ||
*:focus:not(.focus-visible) { | ||
outline: none; | ||
} | ||
html, body, div, span, h1, h2, h3, h4, h5, p, blockquote, pre, a, dl, dt, dd, ol, ul, li, fieldset, form, label, article, aside, header, footer, menu, nav, section, audio, video, figure, figcaption { | ||
margin: 0; | ||
padding: 0; | ||
border: 0; | ||
vertical-align: baseline; | ||
} | ||
input { | ||
margin: 0; | ||
padding: 0; | ||
} | ||
ul, ol { | ||
list-style: none; | ||
} | ||
body { | ||
font-family: 'Open Sans', sans-serif; | ||
} | ||
`; | ||
|
||
export default GlobalStyles; |
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,16 @@ | ||
module.exports = { | ||
stories: [ | ||
'../src/**/*.stories.mdx', | ||
'../src/**/*.stories.@(js|jsx|ts|tsx)', | ||
], | ||
addons: [ | ||
'@storybook/addon-links', | ||
'@storybook/addon-essentials', | ||
{ | ||
name: '@storybook/addon-docs', | ||
options: { | ||
transcludeMarkdown: true, | ||
}, | ||
}, | ||
], | ||
}; |
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,6 @@ | ||
import {addons} from '@storybook/addons'; | ||
|
||
addons.setConfig({ | ||
panelPosition: 'right', | ||
initialActive: 'sidebar', | ||
}); |
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 {Canvas} from '@storybook/addon-docs/blocks'; | ||
|
||
import 'focus-visible'; | ||
|
||
import ThemeSection from '../src/ThemeSection'; | ||
import theme from '../src/theme'; | ||
|
||
import GlobalStyles from './GlobalStyles'; | ||
|
||
export const decorators = [ | ||
Story => ( | ||
<ThemeSection name="page" baseTheme={theme}> | ||
<GlobalStyles /> | ||
{Story()} | ||
</ThemeSection> | ||
), | ||
]; | ||
|
||
export const parameters = { | ||
actions: {argTypesRegex: '^on[A-Z].*'}, | ||
controls: { | ||
matchers: { | ||
color: /(background|color)$/i, | ||
date: /Date$/, | ||
}, | ||
}, | ||
options: { | ||
storySort: { | ||
order: ['base5-ui', 'Components'], | ||
}, | ||
}, | ||
backgrounds: { | ||
disable: true, | ||
grid: { | ||
disable: true, | ||
}, | ||
}, | ||
docs: { | ||
components: { | ||
Canvas: ({children, ...props}) => ( | ||
<ThemeSection name="page" baseTheme={theme}> | ||
<Canvas {...props}>{children}</Canvas> | ||
</ThemeSection> | ||
), | ||
}, | ||
}, | ||
}; |
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
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.