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

scratch-blocks in react application. #3012

Open
asadgulxar opened this issue Apr 6, 2023 · 2 comments
Open

scratch-blocks in react application. #3012

asadgulxar opened this issue Apr 6, 2023 · 2 comments

Comments

@asadgulxar
Copy link

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
Copy link

Elsper01 commented Feb 5, 2024

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
Copy link

mxmou commented Feb 6, 2024

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

That's scratchblocks, not scratch-blocks.

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

3 participants