Skip to content

Commit

Permalink
fix(Dropdown): added max height to Items
Browse files Browse the repository at this point in the history
  • Loading branch information
N00nDay committed Nov 22, 2023
1 parent a5992d2 commit 11965b1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/components/dropdown/Items.svelte
Expand Up @@ -35,7 +35,7 @@
}
const defaultClass =
'floating-ui-el origin-top-right absolute z-10 border border-border w-56 p-1 rounded-md shadow-xl py-1 bg-surface stwui-dropdown-items';
'floating-ui-el origin-top-right absolute z-10 border border-border w-56 p-1 rounded-md shadow-xl py-1 bg-surface max-h-[256px] overflow-y-auto stwui-dropdown-items';
$: finalClass = twMerge(defaultClass, $$props.class);
Expand Down
4 changes: 4 additions & 0 deletions src/routes/dropdown/+page.svelte
Expand Up @@ -112,6 +112,10 @@
<Dropdown.Items.Item on:click={closeDropdown2} label="Notifications">
<Badge type="info" slot="extra">+99</Badge>
</Dropdown.Items.Item>
<Dropdown.Items.Item on:click={closeDropdown2} label="Item 4" />
<Dropdown.Items.Item on:click={closeDropdown2} label="Item 5" />
<Dropdown.Items.Item on:click={closeDropdown2} label="Item 6" />
<Dropdown.Items.Item on:click={closeDropdown2} label="Item 7" />
<Dropdown.Items.Divider />
<Button type="danger" class="w-full justify-between">
<Button.Leading slot="leading" data={home} />
Expand Down

1 comment on commit 11965b1

@vercel
Copy link

@vercel vercel bot commented on 11965b1 Nov 22, 2023

Choose a reason for hiding this comment

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

Successfully deployed to the following URLs:

stwui – ./

stwui.vercel.app
stwui-git-main-n00nday.vercel.app
stwui-n00nday.vercel.app

Please sign in to comment.