Skip to content

Commit 14ec2a6

Browse files
committed
create story for FilterUI
1 parent b0ec6ca commit 14ec2a6

File tree

3 files changed

+33
-18
lines changed

3 files changed

+33
-18
lines changed

packages/web/src/components/FilterUI/FilterUI.tsx

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,6 @@ import { RegistrationFilter } from "./FilterComponents/RegistrationFilter.tsx";
1616
import { SemestersCheckbox } from "./FilterComponents/Semester.tsx";
1717
import { FilterCard } from "./UI/FilterCard.tsx";
1818

19-
/**
20-
* フィルタの型定義
21-
*/
2219
type Filter = {
2320
isFreewordForSyllabusDetail?: boolean; // フリーワード検索
2421
semesters?: Semester[]; // セメスター
@@ -29,10 +26,6 @@ type Filter = {
2926
showNotRegistered?: boolean; // 未履修の授業を表示する
3027
};
3128

32-
/**
33-
* フィルタUI
34-
* @returns フィルタUI
35-
*/
3629
export const FilterUI: React.FC = () => {
3730
// 現在のフィルター
3831
const [filter, setFilter] = useState<Filter>({});

packages/web/src/components/FilterUI/Sample/page.tsx

Lines changed: 0 additions & 11 deletions
This file was deleted.
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
import type { Meta, StoryObj } from "@storybook/react";
2+
import { FilterUI } from "@/components/FilterUI/FilterUI.tsx";
3+
4+
const meta = {
5+
title: "Components/FilterUI",
6+
component: FilterUI,
7+
tags: ["autodocs"],
8+
parameters: {
9+
layout: "centered",
10+
docs: {
11+
description: {
12+
component: `A filter UI component that allows users to filter courses based on various criteria.
13+
Includes filters for free text search, semesters, evaluation methods, class types, and registration status.`,
14+
},
15+
},
16+
},
17+
argTypes: {
18+
// No direct props since FilterUI manages its own state internally
19+
},
20+
} satisfies Meta<typeof FilterUI>;
21+
22+
export default meta;
23+
type Story = StoryObj<typeof meta>;
24+
25+
// Default story showing the FilterUI with no initial filters
26+
const Template: Story = {
27+
render: () => <FilterUI />,
28+
};
29+
30+
export const Default = {
31+
...Template,
32+
args: {},
33+
};

0 commit comments

Comments
 (0)