Skip to content

Commit 75d70a9

Browse files
authored
chore: add a story for WorkspaceOutdatedTooltip (#11695)
1 parent 6090007 commit 75d70a9

File tree

2 files changed

+30
-1
lines changed

2 files changed

+30
-1
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
import { action } from "@storybook/addon-actions";
2+
import type { Meta, StoryObj } from "@storybook/react";
3+
import { MockTemplateVersion, MockTemplate } from "testHelpers/entities";
4+
import { WorkspaceOutdatedTooltip } from "./WorkspaceOutdatedTooltip";
5+
6+
const meta: Meta<typeof WorkspaceOutdatedTooltip> = {
7+
title: "components/WorkspaceOutdatedTooltip",
8+
component: WorkspaceOutdatedTooltip,
9+
parameters: {
10+
queries: [
11+
{
12+
key: ["templateVersion", MockTemplateVersion.id],
13+
data: MockTemplateVersion,
14+
},
15+
],
16+
},
17+
args: {
18+
onUpdateVersion: action("onUpdateVersion"),
19+
templateName: MockTemplate.display_name,
20+
latestVersionId: MockTemplateVersion.id,
21+
},
22+
};
23+
24+
export default meta;
25+
type Story = StoryObj<typeof WorkspaceOutdatedTooltip>;
26+
27+
const Example: Story = {};
28+
29+
export { Example as WorkspaceOutdatedTooltip };

site/src/components/WorkspaceOutdatedTooltip/WorkspaceOutdatedTooltip.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ export const Language = {
2626

2727
interface TooltipProps {
2828
onUpdateVersion: () => void;
29-
latestVersionId: string;
3029
templateName: string;
30+
latestVersionId: string;
3131
ariaLabel?: string;
3232
}
3333

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy