Skip to content

Commit

Permalink
next: tidy up docs (#1404)
Browse files Browse the repository at this point in the history
  • Loading branch information
huntabyte authored Oct 30, 2024
1 parent 37e3cf3 commit f3245bb
Show file tree
Hide file tree
Showing 10 changed files with 30 additions and 14 deletions.
12 changes: 6 additions & 6 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion sites/docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
"embla-carousel-autoplay": "8.1.6",
"embla-carousel-svelte": "8.1.6",
"estree-walker": "^3.0.3",
"formsnap": "2.0.0-next.0",
"formsnap": "2.0.0-next.1",
"hast-util-to-html": "^9.0.1",
"is-reference": "^3.0.2",
"lodash.template": "^4.5.0",
Expand Down
6 changes: 6 additions & 0 deletions sites/docs/src/content/components/command.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,3 +104,9 @@ To show the command menu in a dialog, use the `<Command.Dialog />` component ins
</Command.List>
</Command.Dialog>
```

## Changelog

### 2024-10-30 Classes for icons

- Added `gap-2 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0` to the `<Command.Item>` component to automatically style the icons inside.
7 changes: 7 additions & 0 deletions sites/docs/src/content/components/dropdown-menu.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,3 +75,10 @@ Install `bits-ui`:
<div></div>

</ComponentPreview>

## Changelog

### 2024-10-30 Classes for DropdownMenu.SubTrigger

- Added `gap-2 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0` to the `<DropdownMenu.SubTrigger>` to automatically style icon inside the dropdown menu sub trigger.
- Removed `size-4` from the icon inside the `<DropdownMenu.SubTrigger>` since it is now handled by the parent `<DropdownMenu.SubTrigger>`.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

<CommandPrimitive.Item
class={cn(
"aria-selected:bg-accent aria-selected:text-accent-foreground relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
"aria-selected:bg-accent aria-selected:text-accent-foreground relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
className
)}
bind:ref
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@
<DropdownMenuPrimitive.SubTrigger
bind:ref
class={cn(
"data-[highlighted]:bg-accent data-[state=open]:bg-accent data-[highlighted]:text-accent-foreground data-[state=open]:text-accent-foreground flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none",
"data-[highlighted]:bg-accent data-[state=open]:bg-accent flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
inset && "pl-8",
className
)}
{...restProps}
>
{@render children?.()}
<ChevronRight class="ml-auto size-4" />
<ChevronRight class="ml-auto" />
</DropdownMenuPrimitive.SubTrigger>
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

<CommandPrimitive.Item
class={cn(
"aria-selected:bg-accent aria-selected:text-accent-foreground relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
"aria-selected:bg-accent aria-selected:text-accent-foreground relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
className
)}
bind:ref
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@
<DropdownMenuPrimitive.SubTrigger
bind:ref
class={cn(
"data-[highlighted]:bg-accent data-[state=open]:bg-accent data-[highlighted]:text-accent-foreground data-[state=open]:text-accent-foreground flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none",
"data-[highlighted]:bg-accent data-[state=open]:bg-accent flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
inset && "pl-8",
className
)}
{...restProps}
>
{@render children?.()}
<ChevronRight class="ml-auto size-4" />
<ChevronRight class="ml-auto" />
</DropdownMenuPrimitive.SubTrigger>
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,9 @@
<Form.Label>Email</Form.Label>
<Select.Root type="single" bind:value={$formData.email} name={props.name}>
<Select.Trigger {...props}>
{$formData.email ?? "Select a verified email to display"}
{$formData.email && $formData.email.length
? $formData.email
: "Select a verified email to display"}
</Select.Trigger>
<Select.Content>
<Select.Item value="[email protected]" label="[email protected]" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
<div class="flex items-center space-x-2">
<p class="text-sm font-medium">Rows per page</p>
<Select.Root
allowDeselect={false}
type="single"
value={`${table.getState().pagination.pageSize}`}
onValueChange={(value) => {
Expand Down

0 comments on commit f3245bb

Please sign in to comment.