mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
chore: add a story for WorkspaceOutdatedTooltip (#11695)
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
import { action } from "@storybook/addon-actions";
|
||||
import type { Meta, StoryObj } from "@storybook/react";
|
||||
import { MockTemplateVersion, MockTemplate } from "testHelpers/entities";
|
||||
import { WorkspaceOutdatedTooltip } from "./WorkspaceOutdatedTooltip";
|
||||
|
||||
const meta: Meta<typeof WorkspaceOutdatedTooltip> = {
|
||||
title: "components/WorkspaceOutdatedTooltip",
|
||||
component: WorkspaceOutdatedTooltip,
|
||||
parameters: {
|
||||
queries: [
|
||||
{
|
||||
key: ["templateVersion", MockTemplateVersion.id],
|
||||
data: MockTemplateVersion,
|
||||
},
|
||||
],
|
||||
},
|
||||
args: {
|
||||
onUpdateVersion: action("onUpdateVersion"),
|
||||
templateName: MockTemplate.display_name,
|
||||
latestVersionId: MockTemplateVersion.id,
|
||||
},
|
||||
};
|
||||
|
||||
export default meta;
|
||||
type Story = StoryObj<typeof WorkspaceOutdatedTooltip>;
|
||||
|
||||
const Example: Story = {};
|
||||
|
||||
export { Example as WorkspaceOutdatedTooltip };
|
||||
@@ -26,8 +26,8 @@ export const Language = {
|
||||
|
||||
interface TooltipProps {
|
||||
onUpdateVersion: () => void;
|
||||
latestVersionId: string;
|
||||
templateName: string;
|
||||
latestVersionId: string;
|
||||
ariaLabel?: string;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user