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

when classes is passed a string, it is treated as a list #819

Open
paddymul opened this issue Oct 15, 2024 · 0 comments
Open

when classes is passed a string, it is treated as a list #819

paddymul opened this issue Oct 15, 2024 · 0 comments

Comments

@paddymul
Copy link

the type for classes is classes: List[str] = []. when it is passed a string, each character is interpreted as a separate class name.

You might want to throw an error for this because it's an easy mistake to make and will lead to unexpected results for users.

For consistency with react, you might want to rename classes as classNames.

Related
the solara.Style component is a bit confusingly named. Since the demos only show it accepting a css stylesheet path, I missed that it actually accepts a css string.

You might want to make solara.Stylesheet which inserts a css file. and solara.StyleBlock that accepts css text.

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

1 participant