-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Chakra-Ui theme does not seem to work #2865
Comments
Is there any progress on this? Can anyone verify this? |
Can you explain what isn't working? In the example you show things appear to work just fine. I noticed that you have added props to the |
I'm just doing the same thing as what is shown in the docs, yet the example in the docs does not work. https://react-jsonschema-form.readthedocs.io/en/latest/api-reference/themes/chakra-ui/uiSchema/ "The props are given to the parent component in the individual widget. To pass styles to the inner components, use the sx prop." In my example, I have done the following:
Which means that it should pass background blue.200 to the button, but it does not. It also doesn't seem to do anything with
Perhaps you could explain what I'm doing wrong, or maybe the limitations of this tool, and what exactly should I expect to see based on the example provided in the docs? |
@jzander @rodrigofuentes As listed contributors, perhaps you understand how this is supposed to work? |
@jzander @rodrigofuentes |
@heath-freenome |
@DmacMcgreg After digging deeper I see the problem. First the I've updated your example apply in your |
Hmmm, after reading the documentation, I can see why you got confused. We need to fix the documentation to be clearer. |
That's excellent that you figured it out @heath-freenome ! |
There are two approaches, you can add your own by making it a child of |
Fixed documentation |
So @heath-freenome I gave the submitButtonProps.props a whirl, but it doesn't seem to pick up the chakra options. I tried just about every variation I could think of: I'm not completely sure what you mean by making it a child of Do you have an example of that? |
https://react-jsonschema-form.readthedocs.io/en/latest/api-reference/form-props/#children |
Prerequisites
What theme are you using?
chakra-ui
Version
4.1.1
Current Behavior
Chakra-Ui ui options do not seem to do anything at all.
i've copied the example from the docs, both in the playground and locally, and it doesn't seem to do anything at all.
https://rjsf-team.github.io/react-jsonschema-form/#eyJmb3JtRGF0YSI6eyJmaXJzdE5hbWUiOiJDaHVjayIsImxhc3ROYW1lIjoiTm9ycmlzIiwiYWdlIjo3NSwiYmlvIjoiUm91bmRob3VzZSBraWNraW5nIGFzc2VzIHNpbmNlIDE5NDAiLCJwYXNzd29yZCI6Im5vbmV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1aTpoZWxwIjoiSGludDogTWFrZSBpdCBzdHJvbmchIn0sImRhdGUiOnsidWk6d2lkZ2V0IjoiYWx0LWRhdGV0aW1lIn0sInRlbGVwaG9uZSI6eyJ1aTpvcHRpb25zIjp7ImlucHV0VHlwZSI6InRlbCJ9fX0sInRoZW1lIjoiY2hha3JhLXVpIiwibGl2ZVNldHRpbmdzIjp7InZhbGlkYXRlIjpmYWxzZSwiZGlzYWJsZSI6ZmFsc2UsInJlYWRvbmx5IjpmYWxzZSwib21pdEV4dHJhRGF0YSI6ZmFsc2UsImxpdmVPbWl0IjpmYWxzZX19
Expected Behavior
No response
Steps To Reproduce
No response
Environment
No response
Anything else?
No response
The text was updated successfully, but these errors were encountered: