-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
006e8a8
commit 5b4e375
Showing
34 changed files
with
590 additions
and
289 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 0 additions & 22 deletions
22
sample/src/components/molecules/forms/login-form.stories.tsx
This file was deleted.
Oops, something went wrong.
33 changes: 33 additions & 0 deletions
33
sample/src/components/molecules/forms/logins/login-form.stories.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import LoginForm from '@/components/molecules/forms/logins/login-form' | ||
import type { Meta, StoryObj } from '@storybook/react' | ||
import { MemoryRouter, Route, Routes } from 'react-router-dom' | ||
|
||
const meta: Meta<typeof LoginForm> = { | ||
title: 'molecules/forms/logins/login-form', | ||
component: LoginForm, | ||
parameters: { | ||
// Optional parameter to center the component in the Canvas. More info: https://storybook.js.org/docs/configure/story-layout | ||
layout: 'centered', | ||
}, | ||
tags: ['autodocs'], | ||
} | ||
|
||
export default meta | ||
|
||
type Story = StoryObj<typeof LoginForm> | ||
|
||
/** | ||
* width: 100% を指定しているので、親オブジェクトで調整が必要です | ||
* 下記のバリデーションルールが適用されています | ||
* * ユーザー名:4文字以上 | ||
* * パスワード:8文字以上 | ||
*/ | ||
export const Default: Story = { | ||
render: () => ( | ||
<MemoryRouter initialEntries={['/login']}> | ||
<Routes> | ||
<Route path="/login" element={<LoginForm />} /> | ||
</Routes> | ||
</MemoryRouter> | ||
), | ||
} |
File renamed without changes.
27 changes: 27 additions & 0 deletions
27
sample/src/components/molecules/forms/products/product-addition-form.stories.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import ProductAdditionForm from '@/components/molecules/forms/products/product-addition-form' | ||
import type { Meta, StoryObj } from '@storybook/react' | ||
|
||
const meta: Meta<typeof ProductAdditionForm> = { | ||
title: 'molecules/forms/products/product-addition-form', | ||
component: ProductAdditionForm, | ||
parameters: { | ||
// Optional parameter to center the component in the Canvas. More info: https://storybook.js.org/docs/configure/story-layout | ||
layout: 'centered', | ||
}, | ||
tags: ['autodocs'], | ||
} | ||
|
||
export default meta | ||
|
||
type Story = StoryObj<typeof ProductAdditionForm> | ||
|
||
/** | ||
* 活性化時 | ||
* | ||
* イメージURL には `https://placehold.jp/150x150.png` などを利用すると動作確認できます | ||
*/ | ||
export const Default: Story = { | ||
args: { | ||
afterSubmit: () => alert('submit されました'), | ||
}, | ||
} |
10 changes: 5 additions & 5 deletions
10
...molecules/forms/product-addition-form.tsx → .../forms/products/product-addition-form.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
sample/src/components/molecules/forms/products/product-deletion-form.stories.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import ProductDeletionForm from '@/components/molecules/forms/products/product-deletion-form' | ||
import type { Meta, StoryObj } from '@storybook/react' | ||
|
||
const meta: Meta<typeof ProductDeletionForm> = { | ||
title: 'molecules/forms/products/product-deletion-form', | ||
component: ProductDeletionForm, | ||
parameters: { | ||
// Optional parameter to center the component in the Canvas. More info: https://storybook.js.org/docs/configure/story-layout | ||
layout: 'centered', | ||
}, | ||
tags: ['autodocs'], | ||
} | ||
|
||
export default meta | ||
|
||
type Story = StoryObj<typeof ProductDeletionForm> | ||
|
||
/** | ||
* 活性化時 | ||
*/ | ||
export const Default: Story = { | ||
args: { | ||
selectedProduct: { | ||
id: 123, | ||
name: '商品A', | ||
image: '商品.jpg', | ||
price: 12000, | ||
description: | ||
'Lorem, ipsum dolor sit amet consectetur adipisicing elit. Debitis alias, reiciendis commodi possimus, maiores accusantium, iusto repellendus minima labore libero eius magnam impedit?', | ||
}, | ||
handleCancel: () => alert('キャンセル'), | ||
afterSubmit: () => alert('submit されました'), | ||
}, | ||
} |
8 changes: 4 additions & 4 deletions
8
...molecules/forms/product-deletion-form.tsx → .../forms/products/product-deletion-form.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
sample/src/components/molecules/forms/products/product-editing-form.stories.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import ProductEditingForm from '@/components/molecules/forms/products/product-editing-form' | ||
import type { Meta, StoryObj } from '@storybook/react' | ||
|
||
const meta: Meta<typeof ProductEditingForm> = { | ||
title: 'molecules/forms/products/product-editing-form', | ||
component: ProductEditingForm, | ||
parameters: { | ||
// Optional parameter to center the component in the Canvas. More info: https://storybook.js.org/docs/configure/story-layout | ||
layout: 'centered', | ||
}, | ||
tags: ['autodocs'], | ||
} | ||
|
||
export default meta | ||
|
||
type Story = StoryObj<typeof ProductEditingForm> | ||
|
||
/** | ||
* 活性化時 | ||
* | ||
* イメージURL には `https://placehold.jp/150x150.png` などを利用すると動作確認できます | ||
*/ | ||
export const Default: Story = { | ||
args: { | ||
initialCurrentProduct: { | ||
id: 123, | ||
name: '商品A', | ||
image: '商品.jpg', | ||
price: 12000, | ||
description: | ||
'Lorem, ipsum dolor sit amet consectetur adipisicing elit. Debitis alias, reiciendis commodi possimus, maiores accusantium, iusto repellendus minima labore libero eius magnam impedit?', | ||
}, | ||
handleCancel: () => alert('キャンセル'), | ||
afterSubmit: () => alert('submit されました'), | ||
}, | ||
} |
19 changes: 12 additions & 7 deletions
19
.../molecules/forms/product-editing-form.tsx → ...s/forms/products/product-editing-form.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
sample/src/components/organisms/tenants/posts/bulk-action-buttons.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import React from 'react' | ||
import { | ||
BulkDeleteButton, | ||
BulkExportButton, | ||
BulkUpdateButton, | ||
} from 'react-admin' | ||
|
||
const BulkActionButtons = React.memo(function BulkActionButtons() { | ||
return ( | ||
<> | ||
<BulkDeleteButton /> | ||
<BulkExportButton /> | ||
<BulkUpdateButton label="Reset Title" data={{ title: '' }} /> | ||
</> | ||
) | ||
}) | ||
|
||
export default BulkActionButtons |
Oops, something went wrong.