Open naomiHauret opened 6 years ago
Do you have a repo you can share for us to experiment on?
I've never used that combo of addons, or react-css-modules.
Sure ! My whole code is accessible on this repo I'm trying to create a complete boilerplate so don't hesitate if you just only the storybook + css-modules parts, I'll create another repo.
You can try to attach PropTypes directly to exported component instead:
const StyledButton = CSSModules(Button, styles)
StyledButton.propTypes = {
label: propTypes.string,
handleClick: propTypes.func,
}
export default StyledButton
@Hypnosphi thanks for your help, it didn't do the trick though :confused: knobs still won't display with this technique.
Hi, I'm having some issue with this add-on.
Here's an example component :
And its stories :
Sadly, it doesn't generate the component's knobs (nor its props proptype with info add-on). If I only use
withKnobs
and add them manually, it works. I don't know if this is related to React CSS Modules, Storybook or to the add-on :confused:A part of my
package.json
:Thanks for your help !