We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Only when I add addon-jsx, I have this problem.
button.tsx
import './button.style.css'; import * as React from 'react'; interface Props { /** * Text for the button */ text: String; } export const ButtonNew = ({ text }: Props) => { const [value, setValue] = React.useState('...'); console.log(value); return ( <div> <div className="green"> {text} <input type="text" value={value} onChange={({ target }) => setValue(target.value)} /> </div> </div> ); }; ButtonNew.defaultProps = { text: 'ok', };
button.stories.tsx
import * as React from 'react'; import { setAddon, storiesOf } from '@storybook/react'; import JSXAddon from 'storybook-addon-jsx'; setAddon(JSXAddon); import { ButtonNew } from '../src/components/button/button'; storiesOf('Administrator/Button', module).addWithJSX('custom', () => <ButtonNew />);
Did you have the same issue?
The text was updated successfully, but these errors were encountered:
Did you find a solution @florinesueur?
Sorry, something went wrong.
@Gabrielmtn no, I did not find a solution and I put this project in standby.
Can you try this again? my projects use many hooks and this addon works fine
No branches or pull requests
Only when I add addon-jsx, I have this problem.
button.tsx
button.stories.tsx
Did you have the same issue?
The text was updated successfully, but these errors were encountered: