scratchfoundation/scratch-blocks

scratch-blocks in react application.

Opened this issue · 2 comments

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?

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
};

Here is a small snippet how to use scratch-blocks in react typescript:

That's scratchblocks, not scratch-blocks.