test(overflow-menu): add more unit tests (#2199)

This commit is contained in:
Eric Liu 2025-09-05 09:00:02 -07:00 committed by GitHub
commit 28d15ffed8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 177 additions and 0 deletions

View file

@ -1,8 +1,25 @@
<script lang="ts">
import { OverflowMenu, OverflowMenuItem } from "carbon-components-svelte";
export let size: "sm" | "xl" | undefined = undefined;
export let light: boolean = false;
export let flipped: boolean = false;
export let direction: "top" | "bottom" = "bottom";
export let menuOptionsClass: string | undefined = undefined;
export let iconClass: string | undefined = undefined;
export let iconDescription: string = "Open and close list of options";
export let id: string = "ccs-" + Math.random().toString(36);
</script>
<OverflowMenu
{size}
{light}
{flipped}
{direction}
{menuOptionsClass}
{iconClass}
{iconDescription}
{id}
on:close={(e) => {
console.log("close", e.detail); // { index: number; text: string; }
}}