We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 723aa86 commit b5a30c6Copy full SHA for b5a30c6
1 file changed
packages/ui/src/components/radio/demos/1.Basic.md
@@ -13,14 +13,26 @@ The simplest usage.
13
最简单的用法。
14
15
```tsx
16
-import { DRadio } from '@react-devui/ui';
+import { useState } from 'react';
17
+
18
+import { DButton, DRadio } from '@react-devui/ui';
19
20
export default function Demo() {
21
+ const [disabled, setDisabled] = useState(false);
22
23
return (
24
<>
- <DRadio>Radio</DRadio>
- <DRadio dDisabled>Radio</DRadio>
- <DRadio dDisabled dModel={true}>
25
+ <DButton
26
+ onClick={() => {
27
+ setDisabled((prev) => !prev);
28
+ }}
29
+ >
30
+ Toggle disabled
31
+ </DButton>
32
+ <br />
33
34
+ <DRadio dDisabled={disabled}>Radio</DRadio>
35
+ <DRadio dDisabled={disabled} dModel>
36
Radio
37
</DRadio>
38
</>
0 commit comments