Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
47 changes: 47 additions & 0 deletions examples/vite/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,66 @@ import {
Stack,
Text,
ThemeProvider,
Badge,
SelectableCardOptionGroup,
} from '@ultraviolet/ui'
// import { InfoTable } from '@ultraviolet/ui/compositions/InfoTable'
import { useState } from 'react'
import '@ultraviolet/ui/styles' // Import styles for the UI components
// import '@ultraviolet/icons/styles' // Import styles for the UI components
import '@ultraviolet/themes/global'
import centos from './assets/centos.svg'
import debian from './assets/debian.svg'
import ubuntu from './assets/ubuntu.svg'
import { centosOptions, debianOptions, ubuntuOptions } from './constants'

export const App = () => {
const [count, setCount] = useState(0)
const [darkMode, setDarkMode] = useState(false)
const [value, onChange] = useState<string>()
const [option, onChangeOption] = useState<string>()

return (
<ThemeProvider theme={darkMode ? consoleDarkTheme : consoleLightTheme}>
<Row gap="3" templateColumns="9fr 3fr">
<Badge sentiment="danger" prominence="strong">
test
</Badge>
{/* <InfoTable>
<InfoTable.Row templateColumns="1fr">
<InfoTable.Cell title="title">Coucou</InfoTable.Cell>
</InfoTable.Row>
</InfoTable> */}
<SelectableCardOptionGroup
onChange={(event: React.ChangeEvent<HTMLInputElement>) => {
console.log('ok')
onChange(event.currentTarget.value)
}}
onChangeOption={(newValue: string) => {
onChangeOption(newValue)
}}
optionValue={option}
value={value}
>
<SelectableCardOptionGroup.Option
image={ubuntu}
label="Ubuntu"
options={ubuntuOptions}
value="ubuntu"
/>
<SelectableCardOptionGroup.Option
image={debian}
label="Debian"
options={debianOptions}
value="debian"
/>
<SelectableCardOptionGroup.Option
image={centos}
label="CentOS"
options={centosOptions}
value="centos"
/>
</SelectableCardOptionGroup>
<Card>
<Text as="h1" variant="headingSmall">
Classic
Expand Down
9 changes: 9 additions & 0 deletions examples/vite/src/assets/centos.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions examples/vite/src/assets/debian.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
47 changes: 47 additions & 0 deletions examples/vite/src/assets/mysql.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 20 additions & 0 deletions examples/vite/src/assets/postgresql.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading