diff --git a/docs/components/radio-button.md b/docs/components/radio-button.md index d3619d8161..9a24ec8c07 100644 --- a/docs/components/radio-button.md +++ b/docs/components/radio-button.md @@ -78,29 +78,29 @@ const App = () => ( ### Sizes -Add the `size` attribute to the [Radio Group](/components/radio-group) to change the size of the radio buttons. +Use the `size` attribute to change a radio button's size. ```html preview - - Option 1 - Option 2 - Option 3 + + Option 1 + Option 2 + Option 3
- - Option 1 - Option 2 - Option 3 + + Option 1 + Option 2 + Option 3
- - Option 1 - Option 2 - Option 3 + + Option 1 + Option 2 + Option 3 ``` @@ -108,29 +108,27 @@ Add the `size` attribute to the [Radio Group](/components/radio-group) to change import { SlRadioButton, SlRadioGroup } from '@shoelace-style/shoelace/dist/react'; const App = () => ( - <> - - Option 1 - Option 2 - Option 3 - - -
- - - Option 1 - Option 2 - Option 3 - - -
- - - Option 1 - Option 2 - Option 3 - - + + Option 1 + Option 2 + Option 3 + + +
+ + + Option 1 + Option 2 + Option 3 + + +
+ + + Option 1 + Option 2 + Option 3 + ); ``` diff --git a/docs/components/radio-group.md b/docs/components/radio-group.md index 3f859ec93a..20d99d82d3 100644 --- a/docs/components/radio-group.md +++ b/docs/components/radio-group.md @@ -98,53 +98,6 @@ const App = () => ( ); ``` -### Sizing Options - -The size of [Radios](/components/radio) and [Radio Buttons](/components/radio-buttons) will be determined by the Radio Group's `size` attribute. - -```html preview - - Small - Medium - Large - - - -``` - -```jsx react -import { useState } from 'react'; -import { SlRadio, SlRadioGroup } from '@shoelace-style/shoelace/dist/react'; - -const App = () => { - const [size, setSize] = useState('medium'); - - return ( - <> - setSize(event.target.value)} - > - Small - Medium - Large - - - ); -}; -``` - -?> [Radios](/components/radio) and [Radio Buttons](/components/radio-button) also have a `size` attribute. This can be useful in certain compositions, but it will be ignored when used inside of a Radio Group. - ### Validation Setting the `required` attribute to make selecting an option mandatory. If a value has not been selected, it will prevent the form from submitting and display an error message. diff --git a/docs/components/radio.md b/docs/components/radio.md index bfba74b0e6..003260d403 100644 --- a/docs/components/radio.md +++ b/docs/components/radio.md @@ -80,30 +80,12 @@ const App = () => ( ## Sizes -Add the `size` attribute to the [Radio Group](/components/radio-group) to change the size of the radios. +Use the `size` attribute to change a radio's size. ```html preview - - Small 1 - Small 2 - Small 3 - - -
- - - Medium 1 - Medium 2 - Medium 3 - - -
- - - Large 1 - Large 2 - Large 3 - +Small +Medium +Large ``` ```jsx react @@ -111,27 +93,11 @@ import { SlRadio } from '@shoelace-style/shoelace/dist/react'; const App = () => ( <> - - Small 1 - Small 2 - Small 3 - - + Small
- - - Medium 1 - Medium 2 - Medium 3 - - + Medium
- - - Large 1 - Large 2 - Large 3 - + Large ); ```