Skip to content
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

Documentation error for the 'extra' attribute #8

Open
FedericoCapaldo opened this issue Apr 13, 2016 · 0 comments
Open

Documentation error for the 'extra' attribute #8

FedericoCapaldo opened this issue Apr 13, 2016 · 0 comments

Comments

@FedericoCapaldo
Copy link

The documentation on this link https://www.npmjs.com/package/react-picture has an error.

return ( <Img alt='Your picture description' srcSet={imgs} extra={{className='myImg'}}/> );

should have extra={{className:'myImg'}} instead of extra={{className='myImg'}}. Otherwise Babel won't transpile the component and will generate an error like:

SyntaxError: /app/components/picture/Picture.js: Unexpected token (17:52) const myClassName = "mcdonald" return ( <Img alt={props.alt} srcSet={imgs} extra={{style="none"}}/> ); };

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant