chakra-ui / chakra-ui-docs

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

getCheckboxProps has been replaced by getRadioProps #1515

Closed mathiasmadsen closed 1 year ago

mathiasmadsen commented 1 year ago

Subject

RadioCard

Description

The useRadio hook states that getCheckboxProps is deprecated.

In the example, the following code snippet:

function RadioCard(props) {
  const { getInputProps, getCheckboxProps } = useRadio(props)

  const input = getInputProps()
  const checkbox = getCheckboxProps()

should be replaced with:

function RadioCard(props) {
  const { getInputProps, getRadioProps } = useRadio(props)

  const input = getInputProps()
  const checkbox = getRadioProps()