Comments (3)
I think your problem is that you aren't loading your stories in you config file. A blank config will load no stories.
You need to do something like
import { configure } from '@storybook/react';
configure(
require.context(
COMPONENT,
true,
/^\.\/(?!(?:node_modules)).*\.stories\.(tsx|ts|js|jsx)$/
),
module
);
To use our default:
require('@design-systems/storybook/.storybook/defaultConfig');
or if you want to order things I do:
function loadStories() {
const req = require.context(
COMPONENT,
true,
/^\.\/(?!(?:node_modules)).*\.stories\.(tsx|ts|js|jsx|mdx)$/
);
// don't use arrow functions
const welcome = req.keys().filter(function(filename) {
return filename.includes('welcome');
});
const styles = req.keys().filter(function(filename) {
return filename.includes('./packages/styles/');
});
const grid = req.keys().filter(function(filename) {
return filename.includes('./packages/responsive-grid/');
});
const designVoice = req.keys().filter(function(filename) {
return filename.includes('design-docs/src/voice');
});
const designMotion = req.keys().filter(function(filename) {
return filename.includes('design-docs/src/motion');
});
const components = req
.keys()
.filter(function(filename) {
return !filename.includes('./styles/');
})
.sort();
return []
.concat(welcome.map(req))
.concat(designVoice.map(req))
.concat(designMotion.map(req))
.concat(styles.map(req))
.concat(components.map(req))
.concat(grid.map(req))
.filter(story => Boolean(story.default));
}
configure(loadStories, module);
from design-systems-cli.
As for the typescript error you should install the types for styled components.
yarn add -DW @types/styled-components
from design-systems-cli.
@ianlapham does this fix your problem?
from design-systems-cli.
Related Issues (20)
- Update Proof plugin to latest version (0.1.1) HOT 10
- Dependency Dashboard
- Auto Formatting Code Using Prettier Action
- yarn start: 'tsc' is not recognized as an internal or external command HOT 21
- Add Contributing Guide HOT 2
- Improve ReadMe HOT 1
- Update Typings HOT 2
- Build Testing HOT 3
- Commit Lint Support HOT 2
- npm failing to install @design-systems HOT 6
- ds storybook start - command error HOT 12
- postcss-loader webpack config uses outdated options object
- feature: upgrade to Yarn 2
- Tests do not fail if coverage does not meet thresholds
- Options issue in styled.tsx
- Add support for component size limits
- Is dark mode possible in the docs?
- Not reading the latest version of component template repo
- Accessibility Keyboard Testing Issues
- Test script does not fire the correct exit code during test suite failures HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from design-systems-cli.