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 #1568

Closed chenhbc closed 1 year ago

chenhbc commented 1 year ago

getRadioProps is not exists, I think need to change to getCheckboxProps.

Closes #

📝 Description

Fix "caught TypeError: getRadioProps is not a function" error

⛳️ Current behavior (updates)

Change getRadioProps to getCheckboxProps

🚀 New behavior

Change getRadioProps to getCheckboxProps in Custom Radio Buttons Section

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

No

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 10, 2023 0:20am
noobinthisgame commented 1 year ago

Hi @chenhbc, as stated in the code of useRadio the getCheckboxProps function is deprecated for this hook and replace by getRadioProps.

Here 2 Sandboxes where it works: codesandbox.io/s/flamboyant-maria-j0sppy codesandbox.io/s/nice-benji-ir6ysk

Let me know in which context you get the Error :)