Skip to content

Commit 2ec7d5e

Browse files
committed
fix: bug
1 parent a531590 commit 2ec7d5e

File tree

17 files changed

+1764
-11
lines changed

17 files changed

+1764
-11
lines changed

examples/vite/src/App.tsx

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,60 @@ import {
77
Stack,
88
Text,
99
ThemeProvider,
10+
Badge,
11+
SelectableCardOptionGroup,
1012
} from '@ultraviolet/ui'
1113
import { useState } from 'react'
1214
import '@ultraviolet/ui/styles' // Import styles for the UI components
1315
// import '@ultraviolet/icons/styles' // Import styles for the UI components
1416
import '@ultraviolet/themes/global'
17+
import centos from './assets/centos.svg'
18+
import debian from './assets/debian.svg'
19+
import ubuntu from './assets/ubuntu.svg'
20+
import { centosOptions, debianOptions, ubuntuOptions } from './constants'
1521

1622
export const App = () => {
1723
const [count, setCount] = useState(0)
1824
const [darkMode, setDarkMode] = useState(false)
25+
const [value, onChange] = useState<string>()
26+
const [option, onChangeOption] = useState<string>()
1927

2028
return (
2129
<ThemeProvider theme={darkMode ? consoleDarkTheme : consoleLightTheme}>
2230
<Row gap="3" templateColumns="9fr 3fr">
31+
<Badge sentiment="danger" prominence="strong">
32+
test
33+
</Badge>
34+
<SelectableCardOptionGroup
35+
onChange={(event: React.ChangeEvent<HTMLInputElement>) => {
36+
console.log('ok')
37+
onChange(event.currentTarget.value)
38+
}}
39+
onChangeOption={(newValue: string) => {
40+
onChangeOption(newValue)
41+
}}
42+
optionValue={option}
43+
value={value}
44+
>
45+
<SelectableCardOptionGroup.Option
46+
image={ubuntu}
47+
label="Ubuntu"
48+
options={ubuntuOptions}
49+
value="ubuntu"
50+
/>
51+
<SelectableCardOptionGroup.Option
52+
image={debian}
53+
label="Debian"
54+
options={debianOptions}
55+
value="debian"
56+
/>
57+
<SelectableCardOptionGroup.Option
58+
image={centos}
59+
label="CentOS"
60+
options={centosOptions}
61+
value="centos"
62+
/>
63+
</SelectableCardOptionGroup>
2364
<Card>
2465
<Text as="h1" variant="headingSmall">
2566
Classic
Lines changed: 9 additions & 0 deletions
Loading
Lines changed: 9 additions & 0 deletions
Loading

examples/vite/src/assets/mysql.svg

Lines changed: 47 additions & 0 deletions
Loading
Lines changed: 20 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)