test(overflow-menu): add more unit tests

This commit is contained in:
Eric Liu 2025-09-05 08:28:51 -07:00
commit cdd3a38448
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; }
}}