scratch-blocks in react application.
Opened this issue · 2 comments
asadgulxar commented
How can we use scratch block in react typescript application? can you please provide a code snippet of a react component that uses scratch-blocks?
Elsper01 commented
Here is a small snippet how to use scratch-blocks in react typescript:
import scratchblocks from 'scratchblocks';
import ScratchBlocks from 'scratchblocks-react';
const ScratchBlocksImage = props => (
<div>
<ScratchBlocks
blockStyle="scratch3"
languages={['en']}
>
{scratchBlocksText}
</ScratchBlocks>
</div>
);
ScratchBlocksImage.propTypes = {
scratchBlocksText: PropTypes.string
};
mxmou commented
Here is a small snippet how to use scratch-blocks in react typescript:
That's scratchblocks, not scratch-blocks.