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

Classes not getting added using classNames #70

Closed
tempcoderr opened this issue Dec 22, 2022 · 1 comment · Fixed by #71
Closed

Classes not getting added using classNames #70

tempcoderr opened this issue Dec 22, 2022 · 1 comment · Fixed by #71

Comments

@tempcoderr
Copy link

tempcoderr commented Dec 22, 2022

Describe the bug
I am using Nextjs with TailwindCSS and thus need to add classes to the components but they are not getting added, but styles are getting added. I have also checked this using the useRef hook.

Expected behavior
Classes should get added

Desktop (please complete the following information):

  • OS: Windows
  • Browser: Chrome
  • Version: 3.5.0

Additional context
Here is my code:

  const classes = {
    header: {
      h2: "text-red-500",
      h3: "text-red-500",
      h4: "text-red-500",
    },
    paragraph: "text-red-500",
  };

<section ref={sectionref}>
    <Output data={data} style={style} classNames={classes} />
</section>

Am i doing something wrong here?

@remoblaser
Copy link
Contributor

remoblaser commented Dec 23, 2022

Same here :(

Upon closer inspection I realized it's just the paragraph block that doesn't apply the classNames. I've created a PR with a fix.
Edit: While using the package I've also realized the header block doesn't render class names, fixed that as well in my PR.

dev-juju pushed a commit that referenced this issue Dec 23, 2022
* Fix #70

Fix the property name since renderers expect a property called "className" instead of "classNames"

* Revert latest changes and fix paragraph renderer

* Fix header classes not being applied
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.

2 participants