Skip to content

Commit

Permalink
feat(setup): add styleguidist to design system
Browse files Browse the repository at this point in the history
  • Loading branch information
pixelmord committed Apr 22, 2020
1 parent ce7eec8 commit b4e1f84
Show file tree
Hide file tree
Showing 8 changed files with 12,500 additions and 4 deletions.
1 change: 1 addition & 0 deletions packages/design-system/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
styleguide.config.js
7 changes: 5 additions & 2 deletions packages/design-system/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
"eject": "react-scripts eject",
"styleguide": "styleguidist server",
"styleguide:build": "styleguidist build"
},
"eslintConfig": {
"extends": "react-app"
Expand All @@ -44,6 +46,7 @@
"eslint-config-prettier": "^6.10.1",
"eslint-plugin-prettier": "^3.1.3",
"eslint-plugin-react": "^7.19.0",
"prettier": "^2.0.4"
"prettier": "^2.0.4",
"react-styleguidist": "^11.0.5"
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/** @jsx jsx */
import { jsx, Box, Styled } from 'theme-ui';

import { PageData } from '../../../poolbase-app/src/app/interfaces';
import { PageData } from '../../../../poolbase-app/src/app/interfaces';

export const ListItem: React.FC<{ data: PageData }> = ({
data,
Expand Down
1 change: 1 addition & 0 deletions packages/design-system/src/components/ListItem/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './ListItem';
2 changes: 1 addition & 1 deletion packages/design-system/src/components/index.tsx
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export * from './ListItem';
export * from './ListItem/ListItem';
9 changes: 9 additions & 0 deletions packages/design-system/src/styleguide/ThemeWrapper.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import React, { Component } from 'react';
import { ThemeProvider } from 'theme-ui';
import { poolbaseTheme } from '../theme';

export default class ThemeWrapper extends Component {
render() {
return <ThemeProvider theme={poolbaseTheme}>{this.props.children}</ThemeProvider>;
}
}
7 changes: 7 additions & 0 deletions packages/design-system/styleguide.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
const path = require('path');
module.exports = {
components: 'src/components/**/[A-Z]*.tsx',
styleguideComponents: {
Wrapper: path.join(__dirname, 'src/styleguide/ThemeWrapper')
}
}
12,475 changes: 12,475 additions & 0 deletions packages/design-system/yarn.lock

Large diffs are not rendered by default.

0 comments on commit b4e1f84

Please sign in to comment.