Skip to content

Commit

Permalink
next: docs cleanup (#1429)
Browse files Browse the repository at this point in the history
  • Loading branch information
huntabyte authored Nov 2, 2024
1 parent a6b5d3c commit 40d2c80
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion sites/docs/src/content/components/select.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ Install `bits-ui`:
import * as Select from "$lib/components/ui/select/index.js";
</script>
<Select.Root>
<Select.Root type="single">
<Select.Trigger class="w-[180px]"></Select.Trigger>
<Select.Content>
<Select.Item value="light">Light</Select.Item>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
];
let month = $state("");
let monthLabel = $derived(months.find((m) => m.value === month) ?? "Month");
let monthLabel = $derived(months.find((m) => m.value === month)?.label ?? "Month");
let year = $state("");
</script>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
const id = useId();
let month = $state("");
let monthLabel = $derived(months.find((m) => m.value === month) ?? "Month");
let monthLabel = $derived(months.find((m) => m.value === month)?.label ?? "Month");
let year = $state("");
</script>

Expand Down Expand Up @@ -145,7 +145,7 @@
<Label for="year">Year</Label>
<Select.Root type="single" bind:value={year}>
<Select.Trigger id="year" aria-label="Year">
{year ?? "Year"}
{year ? year : "Year"}
</Select.Trigger>
<Select.Content>
{#each { length: 10 } as _, i}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<SelectPrimitive.Trigger
bind:ref
class={cn(
"border-input ring-offset-background placeholder:text-muted-foreground focus:ring-ring flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border bg-transparent px-3 py-2 text-sm shadow-sm focus:outline-none focus:ring-1 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",
"border-input ring-offset-background data-[placeholder]:text-muted-foreground focus:ring-ring flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border bg-transparent px-3 py-2 text-sm shadow-sm focus:outline-none focus:ring-1 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",
className
)}
{...restProps}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
];
let month = $state("");
let monthLabel = $derived(months.find((m) => m.value === month) ?? "Month");
let monthLabel = $derived(months.find((m) => m.value === month)?.label ?? "Month");
let year = $state("");
</script>

Expand Down Expand Up @@ -133,7 +133,7 @@
<Label for="year">Year</Label>
<Select.Root type="single" bind:value={year}>
<Select.Trigger id="year" aria-label="Year">
{year ?? "Year"}
{year ? year : "Year"}
</Select.Trigger>
<Select.Content>
{#each { length: 10 } as _, i}
Expand Down

0 comments on commit 40d2c80

Please sign in to comment.