mirror of
https://github.com/coder/coder.git
synced 2026-11-17 18:51:03 +08:00
* Refactor Alert * Refactor Avatar and its stories * Refactor AvatarData and its stories * Refactor CodeExample and its tests * Refactor ServiceBanner stories * Refactor Navbar and its tests * Refactor ServiceBanner stories * Refactor LicenseBannerView stories * Refactor DeploymentBannerView stories * Extract optionValue into a module * Refactor DeleteDialog stories * Refactor ConfirmDialog tests * Refactor EmptyState tests * Flat ErrorBoundaryState and refactor stories * Refactor Expander stories * Refactor FormFooter stories * Refactor FullPageForm stories * Refactor EnterpriseSnackbar stories * Refactor GroupAvatar stories * Refactor HelpTooltip stories and remove index * Remove unecessary types module from IconField * Refactor LoadingButton stories * Refactor Margins stories * Refactor Markdown stories * Refactor PageHeader stories * Refactor PageButton tests * Refactor Pill stories * Refactor Resources stories * Refactor RichParameterInput stories and flat MultiTextField * Remove unecessary Stack story * Refactor TableRowMenu stories * Refactor TemplateLayout stories * Refactor Typography props * Refactor UserAutocomplete * Refactor WorkspaceBuildLogs components and tests * Refactor WorkspaceStatusBadge stories * Fix wrong imports * Remove Example.args pattern * Fix wrong import * Refactor EmptyState stories * Refactor HelpTooltip stories * Remove not valid ErrorAlert story * Fix AvatarData story * Add border back to CodeExample * Fix Navbar story * Fix AgentRow proxy in the stories
23 lines
711 B
TypeScript
23 lines
711 B
TypeScript
import { TableRowMenu } from "./TableRowMenu";
|
|
import type { Meta, StoryObj } from "@storybook/react";
|
|
|
|
const meta: Meta<typeof TableRowMenu> = {
|
|
title: "components/TableRowMenu",
|
|
component: TableRowMenu,
|
|
};
|
|
|
|
export default meta;
|
|
type Story = StoryObj<typeof TableRowMenu<{ id: string }>>;
|
|
|
|
export const Example: Story = {
|
|
args: {
|
|
data: { id: "123" },
|
|
menuItems: [
|
|
{ label: "Suspend", onClick: (data) => alert(data.id), disabled: false },
|
|
{ label: "Update", onClick: (data) => alert(data.id), disabled: false },
|
|
{ label: "Delete", onClick: (data) => alert(data.id), disabled: false },
|
|
{ label: "Explode", onClick: (data) => alert(data.id), disabled: true },
|
|
],
|
|
},
|
|
};
|