mirror of
https://github.com/komodorio/helm-dashboard.git
synced 2026-03-26 06:18:04 +00:00
* Enabled recommended-requiring-type-checking * from .cjs to .js * check * check * check * check * A lot of types aligned and refactored * More strict types * Improvement * Improvements * Improvements * Fixed routs * Fixed import types
30 lines
810 B
TypeScript
30 lines
810 B
TypeScript
import type { Meta } from "@storybook/react-vite";
|
|
import { action } from "storybook/actions";
|
|
import DropDown from "./DropDown";
|
|
import { BsSlack, BsGithub } from "react-icons/bs";
|
|
|
|
const meta = {
|
|
/* 👇 The title prop is optional.
|
|
* See https://storybook.js.org/docs/react/configure/overview#configure-story-loading
|
|
* to learn how to generate automatic titles
|
|
*/
|
|
title: "DropDown",
|
|
component: DropDown,
|
|
} as unknown as Meta<typeof DropDown>;
|
|
|
|
export default meta;
|
|
|
|
const onClick = () => {
|
|
action("onClick")("drop down clicked");
|
|
};
|
|
|
|
export const Default = {
|
|
args: {
|
|
items: [
|
|
{ id: "1", text: "Menu Item 1", onClick: onClick, icon: <BsSlack /> },
|
|
{ id: "2 ", isSeparator: true },
|
|
{ id: "3", text: "Menu Item 3", isDisabled: true, icon: <BsGithub /> },
|
|
],
|
|
},
|
|
};
|