chakra-ui / chakra-ui-docs

Documentation website for chakra ui
https://chakra-ui.com
MIT License
301 stars 478 forks source link

Update usage.mdx #1566

Closed sophonaroap closed 1 year ago

sophonaroap commented 1 year ago

In react, you cannot pass a child as a prop, it needs to be contained within the element. This documentation is misleading and leads to errors, and thus should display code that is valid.

Closes #

📝 Description

In react, you cannot pass a child as a prop, it needs to be contained within the element. This documentation is misleading and leads to errors, and thus should display code that is valid.

⛳️ Current behavior (updates)

Stop React from throwing an error when using code from documentation

🚀 New behavior

Correct documentation with code that does not throw errors

💣 Is this a breaking change (Yes/No):

No

📝 Additional Information

vercel[bot] commented 1 year ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
chakra-ui-docs ✅ Ready (Inspect) Visit Preview May 9, 2023 11:46pm