Skip to content

Commit

Permalink
chore(ui): adjust radio demo
Browse files Browse the repository at this point in the history
  • Loading branch information
xiejay97 committed Feb 24, 2023
1 parent 723aa86 commit b5a30c6
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions packages/ui/src/components/radio/demos/1.Basic.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,26 @@ The simplest usage.
最简单的用法。

```tsx
import { DRadio } from '@react-devui/ui';
import { useState } from 'react';

import { DButton, DRadio } from '@react-devui/ui';

export default function Demo() {
const [disabled, setDisabled] = useState(false);

return (
<>
<DRadio>Radio</DRadio>
<DRadio dDisabled>Radio</DRadio>
<DRadio dDisabled dModel={true}>
<DButton
onClick={() => {
setDisabled((prev) => !prev);
}}
>
Toggle disabled
</DButton>
<br />
<br />
<DRadio dDisabled={disabled}>Radio</DRadio>
<DRadio dDisabled={disabled} dModel>
Radio
</DRadio>
</>
Expand Down

0 comments on commit b5a30c6

Please sign in to comment.