Files
helm-dashboard/frontend/src/components/common/DropDown.stories.tsx
yuri-sakharov f2eb91bc02 Enabled recommended-requiring-type-checking as result type fixes provided (#632)
* 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
2025-12-01 10:19:44 +02:00

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 /> },
],
},
};