-
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.
Merge pull request #137 from thisdot/chore-storybook-not-working
Fix storybook
- Loading branch information
Showing
5 changed files
with
80 additions
and
65 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
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 |
---|---|---|
@@ -1,43 +1,48 @@ | ||
import { Meta, StoryFn } from '@storybook/react'; | ||
import AccountForm from '../AccountForm'; | ||
// import AccountForm from '../AccountForm'; | ||
|
||
export default { | ||
title: 'Components/AccountForm', | ||
component: AccountForm, | ||
// component: AccountForm, | ||
} as Meta; | ||
|
||
const mockedCustomer = { | ||
firstName: 'Mattia', | ||
lastName: 'Magi', | ||
phone: '333333333', | ||
email: '[email protected]', | ||
defaultAddress: null, | ||
addresses: { | ||
edges: [], | ||
nodes: [], | ||
pageInfo: { | ||
hasNextPage: false, | ||
hasPreviousPage: false, | ||
}, | ||
}, | ||
orders: { | ||
edges: [], | ||
nodes: [], | ||
pageInfo: { | ||
hasNextPage: false, | ||
hasPreviousPage: false, | ||
}, | ||
totalCount: '0', | ||
}, | ||
metafields: [], | ||
acceptsMarketing: false, | ||
createdAt: '2022-05-10T15:03:01.000Z', | ||
displayName: 'Megio', | ||
id: 'id', | ||
numberOfOrders: '0', | ||
tags: [], | ||
updatedAt: '2022-05-10T15:03:01.000Z', | ||
}; | ||
const Template: StoryFn = () => <AccountForm customer={mockedCustomer} />; | ||
// const mockedCustomer = { | ||
// firstName: 'Mattia', | ||
// lastName: 'Magi', | ||
// phone: '333333333', | ||
// email: '[email protected]', | ||
// defaultAddress: null, | ||
// addresses: { | ||
// edges: [], | ||
// nodes: [], | ||
// pageInfo: { | ||
// hasNextPage: false, | ||
// hasPreviousPage: false, | ||
// }, | ||
// }, | ||
// orders: { | ||
// edges: [], | ||
// nodes: [], | ||
// pageInfo: { | ||
// hasNextPage: false, | ||
// hasPreviousPage: false, | ||
// }, | ||
// totalCount: '0', | ||
// }, | ||
// metafields: [], | ||
// acceptsMarketing: false, | ||
// createdAt: '2022-05-10T15:03:01.000Z', | ||
// displayName: 'Megio', | ||
// id: 'id', | ||
// numberOfOrders: '0', | ||
// tags: [], | ||
// updatedAt: '2022-05-10T15:03:01.000Z', | ||
// }; | ||
const Template: StoryFn = () => ( | ||
<p className="text-red-500"> | ||
This story has compatibility issue with the latest Next version | ||
</p> | ||
); | ||
// const Template: StoryFn = () => <AccountForm customer={mockedCustomer} />; | ||
|
||
export const Default = Template.bind({}); |
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 |
---|---|---|
@@ -1,14 +1,19 @@ | ||
import { Meta, StoryFn } from '@storybook/react'; | ||
import AddressCard from '../AddressCard'; | ||
import { address } from './data'; | ||
// import AddressCard from '../AddressCard'; | ||
// import { address } from './data'; | ||
|
||
export default { | ||
title: 'Components/AddressCard', | ||
component: AddressCard, | ||
// component: AddressCard, | ||
} as Meta; | ||
|
||
const Template: StoryFn = () => ( | ||
<AddressCard address={address} defaultAddress={true} /> | ||
<p className="text-red-500"> | ||
This story has compatibility issue with the latest Next version | ||
</p> | ||
); | ||
// const Template: StoryFn = () => ( | ||
// <AddressCard address={address} defaultAddress={true} /> | ||
// ); | ||
|
||
export const Default = Template.bind({}); |
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 |
---|---|---|
@@ -1,26 +1,31 @@ | ||
import { Meta, StoryFn } from '@storybook/react'; | ||
import AddressForm from '../AddressForm'; | ||
import { address } from './data'; | ||
// import AddressForm from '../AddressForm'; | ||
// import { address } from './data'; | ||
|
||
export default { | ||
title: 'Components/AddressForm', | ||
component: AddressForm, | ||
// component: AddressForm, | ||
} as Meta; | ||
|
||
const defaultAddress = { | ||
...address, | ||
}; | ||
// const defaultAddress = { | ||
// ...address, | ||
// }; | ||
|
||
const Template: StoryFn = () => ( | ||
<AddressForm | ||
address={address} | ||
defaultAddress={defaultAddress} | ||
isNewAddress={false} | ||
/> | ||
<p className="text-red-500"> | ||
This story has compatibility issue with the latest Next version | ||
</p> | ||
); | ||
// const Template: StoryFn = () => ( | ||
// <AddressForm | ||
// address={address} | ||
// defaultAddress={defaultAddress} | ||
// isNewAddress={false} | ||
// /> | ||
// ); | ||
|
||
export const Default = Template.bind({}); | ||
|
||
const NewTemplate: StoryFn = () => <AddressForm isNewAddress={true} />; | ||
// const NewTemplate: StoryFn = () => <AddressForm isNewAddress={true} />; | ||
|
||
export const AddAddress = NewTemplate.bind({}); | ||
// export const AddAddress = NewTemplate.bind({}); |
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