react-picture icon indicating copy to clipboard operation
react-picture copied to clipboard

Documentation error for the 'extra' attribute

Open FedericoCapaldo opened this issue 9 years ago • 0 comments

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"}}/> ); };

FedericoCapaldo avatar Apr 13 '16 09:04 FedericoCapaldo