8000 feat: add TagInput component for dynamic parameters by jaaydenh · Pull Request #17719 · coder/coder · GitHub
[go: up one dir, main page]

Skip to content
/ coder Public

feat: add TagInput component for dynamic parameters #17719

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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
May 8, 2025
Merged
Changes from 1 commit
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
Prev Previous commit
fix: format
  • Loading branch information
jaaydenh committed May 8, 2025
commit 7648fb6deb809ffdbc5fb4053e22714881790e0c
76 changes: 40 additions & 36 deletions site/src/components/TagInput/TagInput.stories.tsx
8000
Original file line number Diff line number Diff line change
Expand Up @@ -2,55 +2,59 @@ import type { Meta, StoryObj } from "@storybook/react";
import { TagInput } from "./TagInput";

const meta: Meta<typeof TagInput> = {
title: "components/TagInput",
component: TagInput,
decorators: [(Story) => <div style={{ maxWidth: "500px" }}>{Story()}</div>],
title: "components/TagInput",
component: TagInput,
decorators: [(Story) => <div style={{ maxWidth: "500px" }}>{Story()}</div>],
};

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

export const Default: Story = {
args: {
values: [],
},
args: {
values: [],
},
};

export const WithEmptyTags: Story = {
args: {
values: ["", "", ""],
},
args: {
values: ["", "", ""],
},
};

export const WithLongTags: Story = {
args: {
values: ["this-is-a-very-long-long-long-tag-that-might-wrap", "another-long-tag-example", "short"],
},
args: {
values: [
"this-is-a-very-long-long-long-tag-that-might-wrap",
"another-long-tag-example",
"short",
],
},
};

8000
export const WithManyTags: Story = {
args: {
values: [
"tag1",
"tag2",
"tag3",
"tag4",
"tag5",
"tag6",
"tag7",
"tag8",
"tag9",
"tag10",
"tag11",
"tag12",
"tag13",
"tag14",
"tag15",
"tag16",
"tag17",
"tag18",
"tag19",
"tag20",
],
},
args: {
values: [
"tag1",
"tag2",
"tag3",
"tag4",
"tag5",
"tag6",
"tag7",
"tag8",
"tag9",
"tag10",
"tag11",
"tag12",
"tag13",
"tag14",
"tag15",
"tag16",
"tag17",
"tag18",
"tag19",
"tag20",
],
},
};
Loading
0