Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

next: docs cleanup #1429

Merged
merged 3 commits into from
Nov 2, 2024
Merged
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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