docs: migrate UI docs (#13245)
* docs: create a new UI docs project (#13233) * docs: create a new UI docs project * fix installation errors * docs: migrate UI docs content to new project (#13241) * Fix content * added examples for some components * finish adding examples * lint fix * fix build errors * delete empty files * path fixes + refactor * fix build error
This commit is contained in:
1 parent
5b7a041246
commit
d1a1135328
748 files changed
+13079
-7319
No files matched your search
@@ -0,0 +1,38 @@
|
||||
import { Select } from "@medusajs/ui"
|
||||
import * as React from "react"
|
||||
|
||||
export default function SelectDemo() {
|
||||
const [value, setValue] = React.useState<string | undefined>()
|
||||
|
||||
return (
|
||||
<div className="w-[256px]">
|
||||
<Select onValueChange={setValue} value={value}>
|
||||
<Select.Trigger>
|
||||
<Select.Value placeholder="Select a currency" />
|
||||
</Select.Trigger>
|
||||
<Select.Content>
|
||||
{currencies.map((item) => (
|
||||
<Select.Item key={item.value} value={item.value}>
|
||||
{item.label}
|
||||
</Select.Item>
|
||||
))}
|
||||
</Select.Content>
|
||||
</Select>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
const currencies = [
|
||||
{
|
||||
value: "eur",
|
||||
label: "EUR",
|
||||
},
|
||||
{
|
||||
value: "usd",
|
||||
label: "USD",
|
||||
},
|
||||
{
|
||||
value: "dkk",
|
||||
label: "DKK",
|
||||
},
|
||||
]
|
||||
Reference in new issue
Block a user