@@ -7,19 +7,60 @@ import {
77 Stack ,
88 Text ,
99 ThemeProvider ,
10+ Badge ,
11+ SelectableCardOptionGroup ,
1012} from '@ultraviolet/ui'
1113import { useState } from 'react'
1214import '@ultraviolet/ui/styles' // Import styles for the UI components
1315// import '@ultraviolet/icons/styles' // Import styles for the UI components
1416import '@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
1622export 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
0 commit comments