Skip to content

Commit

Permalink
docs: update command input & select multiple-selection styles (#1235)
Browse files Browse the repository at this point in the history
Co-authored-by: Davis SHYAKA <[email protected]>
  • Loading branch information
shyakadavis and shyakadavis authored Feb 21, 2025
1 parent 19b63ac commit f6df8ef
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 10 deletions.
6 changes: 3 additions & 3 deletions docs/src/lib/components/demos/command-demo-dialog.svelte
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<script lang="ts">
import { Command, Dialog } from "bits-ui";
import Sticker from "phosphor-svelte/lib/Sticker";
import CalendarBlank from "phosphor-svelte/lib/CalendarBlank";
import CodeBlock from "phosphor-svelte/lib/CodeBlock";
import Palette from "phosphor-svelte/lib/Palette";
import CalendarBlank from "phosphor-svelte/lib/CalendarBlank";
import RadioButton from "phosphor-svelte/lib/RadioButton";
import Sticker from "phosphor-svelte/lib/Sticker";
import Textbox from "phosphor-svelte/lib/Textbox";
let dialogOpen = $state(false);
Expand Down Expand Up @@ -43,7 +43,7 @@
class="divide-border border-muted bg-background flex h-full w-full flex-col divide-y self-start overflow-hidden rounded-xl border"
>
<Command.Input
class="focus-override h-input bg-background placeholder:text-foreground-alt/50 focus:outline-hidden inline-flex w-[296px] truncate rounded-xl px-4 text-sm transition-colors focus:ring-0"
class="focus-override h-input bg-background placeholder:text-foreground-alt/50 focus:outline-hidden inline-flex truncate rounded-xl px-4 text-sm transition-colors focus:ring-0"
placeholder="Search for something..."
/>
<Command.List class="max-h-[280px] overflow-y-auto overflow-x-hidden px-2 pb-2">
Expand Down
6 changes: 3 additions & 3 deletions docs/src/lib/components/demos/command-demo.svelte
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
<script lang="ts">
import { Command } from "bits-ui";
import Sticker from "phosphor-svelte/lib/Sticker";
import CalendarBlank from "phosphor-svelte/lib/CalendarBlank";
import CodeBlock from "phosphor-svelte/lib/CodeBlock";
import Palette from "phosphor-svelte/lib/Palette";
import CalendarBlank from "phosphor-svelte/lib/CalendarBlank";
import RadioButton from "phosphor-svelte/lib/RadioButton";
import Sticker from "phosphor-svelte/lib/Sticker";
import Textbox from "phosphor-svelte/lib/Textbox";
</script>

<Command.Root
class="divide-border border-muted bg-background flex h-full w-full flex-col divide-y self-start overflow-hidden rounded-xl border"
>
<Command.Input
class="focus-override h-input bg-background placeholder:text-foreground-alt/50 focus:outline-hidden inline-flex w-[296px] truncate rounded-xl px-4 text-sm transition-colors focus:ring-0"
class="focus-override h-input placeholder:text-foreground-alt/50 focus:outline-hidden bg-background inline-flex truncate rounded-xl px-4 text-sm transition-colors focus:ring-0"
placeholder="Search for something..."
/>
<Command.List class="max-h-[280px] overflow-y-auto overflow-x-hidden px-2 pb-2">
Expand Down
10 changes: 6 additions & 4 deletions docs/src/lib/components/demos/select-demo-multiple.svelte
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<script lang="ts">
import { Select } from "bits-ui";
import CaretDoubleDown from "phosphor-svelte/lib/CaretDoubleDown";
import CaretDoubleUp from "phosphor-svelte/lib/CaretDoubleUp";
import CaretUpDown from "phosphor-svelte/lib/CaretUpDown";
import Check from "phosphor-svelte/lib/Check";
import Palette from "phosphor-svelte/lib/Palette";
import CaretUpDown from "phosphor-svelte/lib/CaretUpDown";
import CaretDoubleUp from "phosphor-svelte/lib/CaretDoubleUp";
import CaretDoubleDown from "phosphor-svelte/lib/CaretDoubleDown";
const themes = [
{ value: "light-monochrome", label: "Light Monochrome" },
Expand Down Expand Up @@ -46,7 +46,9 @@
aria-label="Select a theme"
>
<Palette class="text-muted-foreground mr-[9px] size-6" />
{selectedLabel}
<span class="w-[calc(296px-11px-11px-9px)] truncate text-start">
{selectedLabel}
</span>
<CaretUpDown class="text-muted-foreground ml-auto size-6" />
</Select.Trigger>
<Select.Portal>
Expand Down

0 comments on commit f6df8ef

Please sign in to comment.