-
-
Notifications
You must be signed in to change notification settings - Fork 922
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat(Radio): add support for `color` on `<Radio>` * docs: update examples * fix: refactored controlled * test: update tests
- Loading branch information
Showing
18 changed files
with
390 additions
and
262 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<!--start-code--> | ||
|
||
```js | ||
import { Radio } from 'rsuite'; | ||
|
||
const App = () => ( | ||
<> | ||
<Radio checked color="red"> | ||
Red | ||
</Radio> | ||
<Radio checked color="orange"> | ||
Orange | ||
</Radio> | ||
<Radio checked color="yellow"> | ||
Yellow | ||
</Radio> | ||
<Radio checked color="green"> | ||
Green | ||
</Radio> | ||
<Radio checked color="cyan"> | ||
Cyan | ||
</Radio> | ||
<Radio checked color="blue"> | ||
Blue | ||
</Radio> | ||
<Radio checked color="violet"> | ||
Violet | ||
</Radio> | ||
</> | ||
); | ||
ReactDOM.render(<App />, document.getElementById('root')); | ||
``` | ||
|
||
<!--end-code--> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
docs/pages/components/radio/fragments/radio-group-controlled.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<!--start-code--> | ||
|
||
```js | ||
import { Radio } from 'rsuite'; | ||
|
||
const App = () => { | ||
const [value, setValue] = React.useState('A'); | ||
return ( | ||
<RadioGroup name="radio-group-controlled" value={value} onChange={setValue}> | ||
<Radio value="A">Radio A</Radio> | ||
<Radio value="B">Radio B</Radio> | ||
<Radio value="C">Radio C</Radio> | ||
<Radio value="D">Radio D</Radio> | ||
</RadioGroup> | ||
); | ||
}; | ||
|
||
ReactDOM.render(<App />, document.getElementById('root')); | ||
``` | ||
|
||
<!--end-code--> |
23 changes: 0 additions & 23 deletions
23
docs/pages/components/radio/fragments/radio-group-controller.md
This file was deleted.
Oops, something went wrong.
28 changes: 13 additions & 15 deletions
28
docs/pages/components/radio/fragments/radio-group-inline-picker.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 7 additions & 11 deletions
18
docs/pages/components/radio/fragments/radio-group-inline.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.