Skip to content

Commit

Permalink
docs: fix select styles (#705)
Browse files Browse the repository at this point in the history
  • Loading branch information
Scooter1337 authored Jan 27, 2024
1 parent 9ffc662 commit 82eeed2
Show file tree
Hide file tree
Showing 9 changed files with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
<Card.Description>What area are you having problems with?</Card.Description>
</Card.Header>
<Card.Content class="grid gap-6">
<div class="grid grid-cols-2 gap-4">
<div class="grid sm:grid-cols-2 gap-4">
<div class="grid gap-2">
<Label for="aria-{id}">Area</Label>
<Select.Root selected={areas[1]}>
Expand All @@ -77,7 +77,7 @@
<div class="grid gap-2">
<Label for="security-level-{id}">Security Level</Label>
<Select.Root selected={securityLevels[1]}>
<Select.Trigger id="security-level-{id}">
<Select.Trigger id="security-level-{id}" class="line-clamp-1 w-full truncate">
<Select.Value placeholder="Select level" />
</Select.Trigger>
<Select.Content>
Expand Down
2 changes: 1 addition & 1 deletion apps/www/src/lib/registry/default/ui/input/input.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

<input
class={cn(
"flex h-10 w-full rounded-md border border-input bg-transparent px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-foreground file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
"flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
className
)}
bind:value
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

<SelectPrimitive.Trigger
class={cn(
"flex h-10 w-full items-center justify-between rounded-md border border-input bg-transparent px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1 line-clamp-1 truncate",
"flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 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 @@ -11,7 +11,7 @@

<textarea
class={cn(
"flex min-h-[80px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
"flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
className
)}
bind:value
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
<Card.Description>What area are you having problems with?</Card.Description>
</Card.Header>
<Card.Content class="grid gap-6">
<div class="grid grid-cols-2 gap-4">
<div class="grid sm:grid-cols-2 gap-4">
<div class="grid gap-2">
<Label for="area-{id}">Area</Label>
<Select.Root selected={areas[1]}>
Expand All @@ -76,7 +76,7 @@
<div class="grid gap-2">
<Label for="security-level-{id}">Security Level</Label>
<Select.Root selected={securityLevels[1]}>
<Select.Trigger id="security-level-{id}">
<Select.Trigger id="security-level-{id}" class="line-clamp-1 truncate">
<Select.Value placeholder="Select level" />
</Select.Trigger>
<Select.Content>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
<Card.Content>
<div class="flex space-x-2">
<Input value="http://example.com/link/to/document" readonly />
<Button variant="secondary" class="shrink-0">Copy Link</Button>
<Button class="shrink-0">Copy Link</Button>
</div>
<Separator class="my-4" />
<div class="space-y-4">
Expand Down
2 changes: 1 addition & 1 deletion apps/www/src/lib/registry/new-york/ui/button/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const buttonVariants = tv({
destructive:
"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",
outline:
"border border-input bg-transparent shadow-sm hover:bg-accent hover:text-accent-foreground",
"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",
secondary: "bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",
ghost: "hover:bg-accent hover:text-accent-foreground",
link: "text-primary underline-offset-4 hover:underline"
Expand Down
2 changes: 1 addition & 1 deletion apps/www/src/lib/registry/new-york/ui/input/input.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

<input
class={cn(
"flex h-9 w-full rounded-md border border-input bg-background px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-foreground file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",
"flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",
className
)}
bind:value
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

<SelectPrimitive.Trigger
class={cn(
"flex h-9 w-full items-center justify-between rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1 line-clamp-1 truncate",
"flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",
className
)}
{...$$restProps}
Expand Down

1 comment on commit 82eeed2

@vercel
Copy link

@vercel vercel bot commented on 82eeed2 Jan 27, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.