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

CopyBlock warnings #104

Open
fabpico opened this issue Aug 18, 2023 · 4 comments
Open

CopyBlock warnings #104

fabpico opened this issue Aug 18, 2023 · 4 comments
Assignees

Comments

@fabpico
Copy link

fabpico commented Aug 18, 2023

React 18.2.0
Storybook 7.3.1
react-code-blocks 0.1.3

I have this simple implementation

import {CopyBlock, a11yLight} from "react-code-blocks";

<CopyBlock
    language='javascript'
    text={'foo'}
    theme={a11yLight}
/>

The component works, but I get warnings

Warning: Received `false` for a non-boolean attribute `copied`.

If you want to write it to the DOM, pass a string instead: copied="false" or copied={value.toString()}.

If you used to conditionally omit it with copied={condition && value}, pass copied={condition ? value : undefined} instead.
    at button
 ...
Warning: React does not recognize the `codeBlock` prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase `codeblock` instead. If you accidentally passed it from a parent component, remove it from the DOM element.
    at div
... 
@thomasmost
Copy link
Collaborator

Thanks for reporting this — I'll look when I have some time!

@thomasmost thomasmost self-assigned this Aug 18, 2023
itsmythos added a commit to itsmythos/react-code-blocks that referenced this issue Nov 3, 2023
@kxtran
Copy link

kxtran commented Jan 4, 2024

Duplicated of #138

@svjaime
Copy link

svjaime commented Jan 12, 2024

Any update on this?

@fabpico
Copy link
Author

fabpico commented Feb 12, 2024

@thomasmost I would gladly fix it, but I'm currently having problems installing the project. Can a current contributor maybe do the project's todo point Contributor guide for development, so that I can better give a hand?

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

4 participants