Skip to content

Commit

Permalink
fix: Add missing args into stories
Browse files Browse the repository at this point in the history
  • Loading branch information
cballevre committed Mar 11, 2024
1 parent ee2929b commit 3658ead
Show file tree
Hide file tree
Showing 6 changed files with 49 additions and 33 deletions.
30 changes: 30 additions & 0 deletions packages/cozy-sharing/.storybook/fixtures/recipients.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
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
}
]

export { recipients }
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
import { AvatarList } from './AvatarList'
import { recipients } from '../../../.storybook/fixtures/recipients'

const meta = {
component: AvatarList,
args: {}
args: {
recipients: [...recipients, ...recipients]
}
}

export default meta
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,12 @@ import { MemberAvatar } from './MemberAvatar'

const meta = {
component: MemberAvatar,
args: {}
args: {
recipient: {
avatarPath: null,
name: 'John Doe'
}
}
}

export default meta
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
import { ExtraIdentity } from './ExtraIdentity'
import { recipients } from '../../../.storybook/fixtures/recipients'

const meta = {
component: ExtraIdentity,
args: {}
args: {
extraRecipients: recipients
}
}

export default meta
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
import OwnerRecipient from './OwnerRecipient'
import { recipients } from '../../../.storybook/fixtures/recipients'

const meta = {
component: OwnerRecipient,
args: {}
args: {
recipients
}
}

export default meta
Expand Down
Original file line number Diff line number Diff line change
@@ -1,33 +1,5 @@
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
}
]
import { recipients } from '../../../.storybook/fixtures/recipients'

const meta = {
component: RecipientList,
Expand Down

0 comments on commit 3658ead

Please sign in to comment.