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

UserButton Appearance #12

Open
Ernelene opened this issue Aug 8, 2024 · 1 comment
Open

UserButton Appearance #12

Ernelene opened this issue Aug 8, 2024 · 1 comment

Comments

@Ernelene
Copy link

Ernelene commented Aug 8, 2024

Hello
I would like to change the size of the UserButton, i tried doing it with the Appearance but I seem to run into a json serializable error:
raise VarTypeError( reflex.utils.exceptions.VarTypeError: No JSON serializer found for var baseTheme='dark' signIn=None signUp=None variables=None elements={'image': {'style': {'width': '2rem', 'height': '2rem', 'border-radius': '50%', 'margin-right': '0.5rem'}}} of type <class 'reflex_clerk.lib.appearance.Appearance'>..

this is my code:
clerk.user_button(show_name=True, appearance=Appearance(baseTheme = "dark", elements={"image":{"style":{ 'width': '2rem', 'height': '2rem', 'border-radius': '50%', 'margin-right': '0.5rem', }}} )

I might also just be using it incorrectly?
Any help would be appreciated, thanks.

@TimChild
Copy link

What version of reflex are you using? I tried copying your clerk.user_button(...) and see no errors using reflex=0.5.9.
I believe there was a relatively recent change to automatically serialize pydantic models, which may make the difference in terms of the error.

On the other hand, I see no effect at all from providing Appearance... Were you able to get the dark theme part of the Appearance to work?

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

2 participants