-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Style guide for Styleguidist UI #897
Comments
I can try to help if no one is working on it? |
@leahzxxz Sounds great! |
@sapegin Any design/sketch files I should be referring to? |
@leahzxxz Nope, it's about adding a style guide for existing components in module.exports = {
components: 'src/rsg-components/**/[A-Z]*.js',
webpackConfig: {
module: {
rules: [
{
test: /\.jsx?$/,
exclude: /node_modules/,
loader: 'babel-loader',
},
{
test: /\.css$/,
loader: 'style-loader!css-loader',
},
],
},
},
}; |
I see - just want to clarify: adding |
Yep, similar to examples style guides we have ( You may see some components twice ( And also a new script here: react-styleguidist/package.json Lines 143 to 145 in 4396dc2
(You don't need to specify a config path for that case, it will use a default one.) |
Thanks for explaining - I think I understand better now (was wondering why I added the file but it was still only loading the buttons - now I know it's pointing to the |
Yup, you need to add a command to run your new style guide like this:
|
Thanks! A few follow up questions:
P.S. I'm happy to continue working on this, but if you feel like you might want someone more experienced to get it done faster/with less help, I'm happy to submit what I have so far and let someone take over 💃 |
No deadlines in open source, it's our free time and we don't have that many of it usually ;-) Feel free to open a pull request with
Not now, just having all the component in the style guide is enough for now.
Yup, you'll have that with default settings. |
I just added the config file and start script, getting a bunch of errors in the console. Can you point me in the direction of what these errors are? Also in general, how do the components render in the style guide? Since they are all inheriting props, I was wondering where the props are coming from. Thanks! |
We have quite a lot of UI components in Styleguidist now and sometimes it’s hard to find an existing component and how to use it for some new feature. But we have a great tool exactly for that — Styleguidist itself. Let’s make a style guide for our own components.
The text was updated successfully, but these errors were encountered: