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 · 5 comments · May be fixed by #166
Open

CopyBlock warnings #104

fabpico opened this issue Aug 18, 2023 · 5 comments · May be fixed by #166
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
@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?

@kleysonfiretail
Copy link

Any update on this?

@mjaquiery mjaquiery linked a pull request Oct 22, 2024 that will close this issue
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

Successfully merging a pull request may close this issue.

5 participants