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

className not apply #27

Closed
Inaztm opened this issue Mar 24, 2024 · 5 comments · Fixed by #29
Closed

className not apply #27

Inaztm opened this issue Mar 24, 2024 · 5 comments · Fixed by #29

Comments

@Inaztm
Copy link

Inaztm commented Mar 24, 2024

Generates {... props} before className.

image

Can use the cva solution or just add other classes after the "scoped" class?

@typicode
Copy link
Owner

Hi,

I'm not familiar with CVA, but can you try:

// CustomBlock.tsx
import { Block } from './Block.mist'

export function CustomBlock({ children, ...props }) {
  return <Block className="Block" { ...props }>children</Block>
}

@Inaztm
Copy link
Author

Inaztm commented Mar 24, 2024

@typicode

Hi.
In this example, className is ignored

image image

@The-Code-Monkey
Copy link
Contributor

This is related to the ticket I added

@sergupe
Copy link

sergupe commented Mar 24, 2024

I think It is the problem mentioned by @The-Code-Monkey indeed. The code is done so the className are PascalCase and not Camel or Kebab case.

@Inaztm could you try with a PascalCase className?

@The-Code-Monkey
Copy link
Contributor

I will be fixing this tomorrow so the classname is passed through the same as people define it, but the component name will be Pascal case still

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants