Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
Repo info
  • Mar 23 2018 05:16
    ZxBing0066 opened #887
  • Mar 22 2018 21:22
    sapegin closed #886
  • Mar 22 2018 16:17
    sapegin labeled #886
  • Mar 22 2018 16:17
    sapegin labeled #886
  • Mar 22 2018 14:36
    stefanheine opened #886
  • Mar 22 2018 11:24
    sapegin labeled #826
  • Mar 22 2018 11:24
    sapegin closed #867
  • Mar 22 2018 11:23
    sapegin closed #883
  • Mar 22 2018 10:34
    sapegin closed #885
  • Mar 22 2018 09:49
    sapegin closed #881
  • Mar 22 2018 09:44
    RusinovAnton opened #885
  • Mar 22 2018 09:32
    sapegin closed #882
  • Mar 22 2018 09:32
    sapegin milestoned #883
  • Mar 22 2018 09:31
    sapegin labeled #883
  • Mar 22 2018 09:31
    sapegin labeled #884
  • Mar 22 2018 08:15
    sapegin edited #195
  • Mar 21 2018 22:56
    jsphstls opened #884
  • Mar 21 2018 20:14
    denchen edited #883
  • Mar 21 2018 20:13
    denchen opened #883
  • Mar 21 2018 18:08
    sapegin milestoned #868
Iraitz Puente

Hello! I'm having an issue when trying to make the build of my styleguide it says: Cannot read property 'endsWith' of undefined

I've read and created a styleguide.config.js with this:
module.exports = { webpackConfig: require('./node_modules/react-scripts/config/webpack.config.js'), };

But same message

Patrick Macom
Is there a way to include markdown code snippets without styleguidist automatically creating an example from it?
I'm looking for something similar to ```jsx noEditor
The code doesn't really provide a ```jsx noExample that I know of. Any help would be greatly appreciated. I could also submit a PR for this feature if it's necessary.
Opps. Nevermind lol. Found ```jsx static
:thumbsup: I love this tool! Keep up the great work. I'll try to contribute too
Matthew Bulfair
how do I get code snippets to show the clipboard option?

hey i'm wondering in the styleguide config, is it possible to exclude files based on regex?

for example. .. i'm trying to exclude any files that starts with a _

components: 'src/components/**/*.jsx',
ignore: ['**/components/App.jsx', '**/components/**/^_.*.jsx'],

but i couldn't seem to get it to work

Ilya Lytvynov
Hello, did somebody try to use styleguidist with react-jss, any examples how to connect it?
Hi guys, some one could help with CSS?
Andy Cook
Hi, I am rendering my styleguide with one page per section (pagePerSection: true) but the default page of the styleguide shows all the components on one long page. Is there a way to have a custom page (eg index.md) as the default page?
Andy Cook
I was able to achieve the default page by introducing sections, and having the first section with just a markup file, no components
Maciej Stankiewicz
Is there a way to change the env passed to webpack? Now it is set to "development". I'd like to have something like --env.styleguide
Joonas Kallunki
Hi! I did not get pagePerSection to work with sections: [{components: () => ...}] so I made a codesandbox example that shows the problem, is it a bug or something in the API design or just do not understand? https://github.com/styleguidist/react-styleguidist/issues/1145#issuecomment-487824219
Joonas Kallunki
Hey! I'm using React-axe to validate accessibility of the components I create with Styleguidist. But Styleguidist has accessibility errors so it makes the validating a bit harder - I created a PR to fix those errors: styleguidist/react-styleguidist#1359
After if we get the PR through I could make a simple example and/or post how to use Styleguidist to develop accessibility validated components :)
hey guys i am having issues during parsing of my modules:

`Module parse failed: Unexpected token (5:7)
You may need an appropriate loader to handle this file type.
| import IconSVG, { Props as IconSVGProps } from './IconSVG';

export type Props = IconSVGProps & {`

Daniel K.
hi, does anyone knows why a file with React hook needs to have TSX extension to be considered a "component"? when I tried with TS extension it did not bother with loading it
Jason Dunn
My example React component is <SimpleButton />, which merely renders a <button>. My styleguidist markdown is basically the pizza example with no props. It's about as simple as a create-react-app can be. styleguidist in browser is giving me: SyntaxError: Unexpected token (1:6)
1 : <React.Fragment><SimpleButton /></React.Fragment>;
I've checked the issues (open and closed) and it seems like there are similar but not the same problems. Have tried blowing away node_modules, updating all my packages, etc. Am unclear as to how to proceed on debugging "why is React.Fragment a problem here?"
Jason Dunn
Well, starting with a completely new project, RSG works as advertised. So this is something I'm doing wrong. Sorry for the noise here.
Peter Lyons
Anyone know what's up with this error message? serverPort config option should be number, received number.
@focusaurus I'm fine with the default value of 6060 for serverPort and don't have it in my styleguide.config.js
@focusaurus Ah I have a theory now...
Vicenzo Naves
Trying to implement this wonderful tool at my job
but for the life of me I can't make the props appear on the page
@vinchbr Please provide at least a repo, there could be numerous of reasons
Vicenzo Naves

Hi everybody. I'm having issues when trying to run styleguidist on my React project (created with create-react-app)
After running npx styleguidist server, when I go to http://localhost:6060/ nothing appears on the page, and I have an error in the console :

Uncaught Error: react-modal: No elements were found for selector #root.
at assertNodeList (ariaAppHider.js:30)
at Object.setElement (ariaAppHider.js:39)
at Function.setAppElement (Modal.js:247)
at Module../src/components/address/UserDetail.jsx (UserDetail.jsx:19)
at webpack_require (bootstrap:786)
at fn (bootstrap:149)
at Object../node_modules/react-styleguidist/lib/loaders/styleguide-loader.js!./node_modules/react-styleguidist/lib/client/index.js (index.js?3b40:52)
at webpack_require (bootstrap:786)
at fn (bootstrap:149)
at render (index.js:37)

I have forgotten some setup ?
Thanks a lot

@espern looks to me like a error in one of your components instead of RSG
Hi there, would anyone be able to help me get Styleguidist working with Meteor?
Using a combo of Meteor+React
Ali Ahsan
does anyone understand how styleguidist reports error ? does it do through stderr ?
Zeljko Marinkovic
need some help, cannot find solution neither on styleguidist github, nor react-docgen
 Warning: Cannot parse src\components\Article.js: Error: Plugin/Preset files are not allowed to export objects, only functions. In C:\github\react-article-module\node_modules\babel-preset-stage-1\lib\index.js

It usually means that react-docgen does not understand your source code, try to file an issue here:

Any idea what might be causing this? I'm trying to follow https://github.com/styleguidist/react-styleguidist/blob/master/.github/Contributing.md

And running npm run test:watch gives me an error:

jest-haste-map: duplicate manual mock found: build
The following files share their name; please delete one of them:

* <rootDir>/lib/scripts/__mocks__/build.js
* <rootDir>/src/scripts/__mocks__/build.js

jest-haste-map: duplicate manual mock found: server
The following files share their name; please delete one of them:

* <rootDir>/lib/scripts/__mocks__/server.js
* <rootDir>/src/scripts/__mocks__/server.js

2019-07-24 10:53 node[34022] (FSEvents.framework) FSEventStreamStart: register_with_server: ERROR: f2d_register_rpc() => (null) (-22)
2019-07-24 10:53 node[34022] (FSEvents.framework) FSEventStreamStart: register_with_server: ERROR: f2d_register_rpc() => (null) (-22)
2019-07-24 10:53 node[34022] (FSEvents.framework) FSEventStreamStart: register_with_server: ERROR: f2d_register_rpc() => (null) (-22)
Error: EMFILE: too many open files, watch
at FSEvent.FSWatcher._handle.onchange (internal/fs/watchers.js:123:28)

hi , how can use routing in styleguide, Ex : localhost://6060/docs
can some body help me.
Diogo Esteves
i just run the comands and i don't see anything in side the components
i nned to add manualy the components on the docs?
Mathieu Marques
Hello, how can I use theme variables from within the configuration file like the documentation suggests? https://react-styleguidist.js.org/docs/cookbook.html#how-to-change-styles-of-a-style-guide
(specifically space which is exported from src/client/styles/theme.js)
Mathieu Marques
Second question, how could I use propsParser option to ignore all classes props without having to manually specify @ignore? Those props come from my own withStyles implementation and shouldn't appear in the documentation
How do I override the style guide name without having to change the name in package.json. I tried displayName property but it does not work.
Tim K.
Hello, is there anyone here familiar with the Styleguidist code base?
I have a question regarding the examples loader and code playground, want to make a PR to support markdown hot loading
Hi, guys, I find styleguidist cool on first sight, but my use case will be a doc site that imbed what styleguidist provides, but it seems styleguidist can only be used as a saparated server?
Aminadav Glickshtein
Anyone success to get the prop types using @param annoitation?