Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

chore: add a story forWorkspaceOutdatedTooltip#11695

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
aslilac merged 2 commits intomainfromoutdated-tooltip-story
Jan 19, 2024
Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -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,
},
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Instead of adding a new decorator you can use parameters like:

parameters:{queries:[{key:["templateVersion",MockTemplateVersion.id],data:MockTemplateVersion}]}

Copy link
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

oh! neat! the health page example I looked at useduseQueryClient, but this seems nice

};

export default meta;
type Story = StoryObj<typeof WorkspaceOutdatedTooltip>;

const Example: Story = {};

export { Example as WorkspaceOutdatedTooltip };
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -26,8 +26,8 @@ export const Language = {

interface TooltipProps {
onUpdateVersion: () => void;
latestVersionId: string;
templateName: string;
latestVersionId: string;
ariaLabel?: string;
}

Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp