-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add stories to recipient components
- Loading branch information
Showing
16 changed files
with
289 additions
and
0 deletions.
There are no files selected for viewing
13 changes: 13 additions & 0 deletions
13
packages/cozy-sharing/src/components/Recipient/AvatarPlusX.stories.jsx
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,13 @@ | ||
import AvatarPlusX from './AvatarPlusX' | ||
|
||
const meta = { | ||
component: AvatarPlusX, | ||
args: {} | ||
} | ||
|
||
export default meta | ||
|
||
export const Default = { | ||
name: 'Default', | ||
args: {} | ||
} |
15 changes: 15 additions & 0 deletions
15
packages/cozy-sharing/src/components/Recipient/Identity.stories.jsx
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,15 @@ | ||
import Identity from './Identity' | ||
|
||
const meta = { | ||
component: Identity, | ||
args: {} | ||
} | ||
|
||
export default meta | ||
|
||
export const Default = { | ||
name: 'Default', | ||
args: { | ||
name: 'John Doe' | ||
} | ||
} |
17 changes: 17 additions & 0 deletions
17
packages/cozy-sharing/src/components/Recipient/LinkRecipient.stories.jsx
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,17 @@ | ||
import LinkRecipient from './LinkRecipient' | ||
|
||
const meta = { | ||
component: LinkRecipient, | ||
args: { | ||
recipientConfirmationData: false, | ||
verifyRecipient: () => true, | ||
link: 'test', | ||
fadeIn: false | ||
} | ||
} | ||
|
||
export default meta | ||
|
||
export const Default = { | ||
name: 'Default' | ||
} |
13 changes: 13 additions & 0 deletions
13
packages/cozy-sharing/src/components/Recipient/LinkRecipientPermissions.stories.jsx
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,13 @@ | ||
import LinkRecipientPermissions from './LinkRecipientPermissions' | ||
|
||
const meta = { | ||
component: LinkRecipientPermissions, | ||
args: {} | ||
} | ||
|
||
export default meta | ||
|
||
export const Default = { | ||
name: 'Default', | ||
args: {} | ||
} |
13 changes: 13 additions & 0 deletions
13
packages/cozy-sharing/src/components/Recipient/OwnerIdentity.stories.jsx
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,13 @@ | ||
import OwnerIdentity from './OwnerIdentity' | ||
|
||
const meta = { | ||
component: OwnerIdentity, | ||
args: {} | ||
} | ||
|
||
export default meta | ||
|
||
export const Default = { | ||
name: 'Default', | ||
args: {} | ||
} |
13 changes: 13 additions & 0 deletions
13
packages/cozy-sharing/src/components/Recipient/OwnerRecipient.stories.jsx
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,13 @@ | ||
import OwnerRecipient from './OwnerRecipient' | ||
|
||
const meta = { | ||
component: OwnerRecipient, | ||
args: {} | ||
} | ||
|
||
export default meta | ||
|
||
export const Default = { | ||
name: 'Default', | ||
args: {} | ||
} |
13 changes: 13 additions & 0 deletions
13
packages/cozy-sharing/src/components/Recipient/OwnerRecipientDefault.stories.jsx
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,13 @@ | ||
import OwnerRecipientDefault from './OwnerRecipientDefault' | ||
|
||
const meta = { | ||
component: OwnerRecipientDefault, | ||
args: {} | ||
} | ||
|
||
export default meta | ||
|
||
export const Default = { | ||
name: 'Default', | ||
args: {} | ||
} |
45 changes: 45 additions & 0 deletions
45
packages/cozy-sharing/src/components/Recipient/Recipient.stories.jsx
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,45 @@ | ||
import Recipient from './Recipient' | ||
|
||
const meta = { | ||
title: 'Components/Recipient/Recipient', | ||
component: Recipient, | ||
args: { | ||
instance: 'https://example.com', | ||
isOwner: false, | ||
status: 'ready', | ||
recipientConfirmationData: null, | ||
verifyRecipient: () => {}, | ||
fadeIn: true | ||
}, | ||
argTypes: { | ||
status: { | ||
control: 'select', | ||
options: ['ready', 'mail-not-sent', 'pending', 'seen', 'owner'], | ||
defaultValue: 'ready' | ||
} | ||
} | ||
} | ||
|
||
export default meta | ||
|
||
export const Default = { | ||
name: 'Default', | ||
args: {} | ||
} | ||
|
||
export const Owner = { | ||
name: 'Owner', | ||
args: { | ||
isOwner: true, | ||
status: 'owner' | ||
} | ||
} | ||
|
||
export const RecipientConfirm = { | ||
name: 'RecipientConfirm', | ||
args: { | ||
recipientConfirmationData: { | ||
email: 'test' | ||
} | ||
} | ||
} |
13 changes: 13 additions & 0 deletions
13
packages/cozy-sharing/src/components/Recipient/RecipientAvatar.stories.jsx
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,13 @@ | ||
import RecipientAvatar from './RecipientAvatar' | ||
|
||
const meta = { | ||
component: RecipientAvatar, | ||
args: {} | ||
} | ||
|
||
export default meta | ||
|
||
export const Default = { | ||
name: 'Default', | ||
args: {} | ||
} |
13 changes: 13 additions & 0 deletions
13
packages/cozy-sharing/src/components/Recipient/RecipientConfirm.stories.jsx
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,13 @@ | ||
import RecipientConfirm from './RecipientConfirm' | ||
|
||
const meta = { | ||
component: RecipientConfirm, | ||
args: {} | ||
} | ||
|
||
export default meta | ||
|
||
export const Default = { | ||
name: 'Default', | ||
args: {} | ||
} |
56 changes: 56 additions & 0 deletions
56
packages/cozy-sharing/src/components/Recipient/RecipientList.stories.jsx
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,56 @@ | ||
import { RecipientList } from './RecipientList' | ||
|
||
const recipients = [ | ||
{ | ||
status: 'owner', | ||
public_name: 'Alice', | ||
email: 'alice@cozy.localhost', | ||
instance: 'http://alice.cozy.localhost:8080', | ||
type: 'two-way', | ||
index: 0 | ||
}, | ||
{ | ||
status: 'pending', | ||
email: 'bob@cozy.localhost', | ||
type: 'two-way', | ||
index: 1 | ||
}, | ||
{ | ||
name: 'Paul', | ||
status: 'mail-not-sent', | ||
email: 'paul@cozy.localhost', | ||
index: 2 | ||
}, | ||
{ | ||
name: 'Eve', | ||
status: 'ready', | ||
email: 'eve@cozy.localhost', | ||
index: 2 | ||
} | ||
] | ||
|
||
const meta = { | ||
component: RecipientList, | ||
args: { | ||
recipients, | ||
recipientsToBeConfirmed: [], | ||
isOwner: false, | ||
onRevoke: () => {}, | ||
onRevokeSelf: () => {}, | ||
verifyRecipient: () => true | ||
} | ||
} | ||
|
||
export default meta | ||
|
||
export const Default = { | ||
name: 'Default', | ||
args: {} | ||
} | ||
|
||
export const Owner = { | ||
name: 'Owner', | ||
args: { | ||
isOwner: true | ||
} | ||
} |
13 changes: 13 additions & 0 deletions
13
packages/cozy-sharing/src/components/Recipient/RecipientPermissions.stories.jsx
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,13 @@ | ||
import RecipientPermissions from './RecipientPermissions' | ||
|
||
const meta = { | ||
component: RecipientPermissions, | ||
args: {} | ||
} | ||
|
||
export default meta | ||
|
||
export const Default = { | ||
name: 'Default', | ||
args: {} | ||
} |
13 changes: 13 additions & 0 deletions
13
packages/cozy-sharing/src/components/Recipient/RecipientPlusX.stories.jsx
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,13 @@ | ||
import RecipientPlusX from './RecipientPlusX' | ||
|
||
const meta = { | ||
component: RecipientPlusX, | ||
args: {} | ||
} | ||
|
||
export default meta | ||
|
||
export const Default = { | ||
name: 'Default', | ||
args: {} | ||
} |
13 changes: 13 additions & 0 deletions
13
packages/cozy-sharing/src/components/Recipient/RecipientStatus.stories.jsx
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,13 @@ | ||
import RecipientStatus from './RecipientStatus' | ||
|
||
const meta = { | ||
component: RecipientStatus, | ||
args: {} | ||
} | ||
|
||
export default meta | ||
|
||
export const Default = { | ||
name: 'Default', | ||
args: {} | ||
} |
13 changes: 13 additions & 0 deletions
13
packages/cozy-sharing/src/components/Recipient/RecipientWithoutStatus.stories.jsx
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,13 @@ | ||
import RecipientWithoutStatus from './RecipientWithoutStatus' | ||
|
||
const meta = { | ||
component: RecipientWithoutStatus, | ||
args: {} | ||
} | ||
|
||
export default meta | ||
|
||
export const Default = { | ||
name: 'Default', | ||
args: {} | ||
} |
13 changes: 13 additions & 0 deletions
13
packages/cozy-sharing/src/components/Recipient/RecipientsAvatars.stories.jsx
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,13 @@ | ||
import RecipientsAvatars from './RecipientsAvatars' | ||
|
||
const meta = { | ||
component: RecipientsAvatars, | ||
args: {} | ||
} | ||
|
||
export default meta | ||
|
||
export const Default = { | ||
name: 'Default', | ||
args: {} | ||
} |