react-picture
react-picture copied to clipboard
Documentation error for the 'extra' attribute
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"}}/> ); };