Skip to content

Commit

Permalink
feat(harvest): Add first story
Browse files Browse the repository at this point in the history
  • Loading branch information
acezard committed Jun 27, 2023
1 parent 02b56a2 commit 990773d
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 92 deletions.
@@ -0,0 +1,51 @@
import React from 'react'

import { useCozyDialog } from 'cozy-ui/transpiled/react/CozyDialogs'
import { BreakpointsProvider } from 'cozy-ui/transpiled/react/hooks/useBreakpoints'

import { AccountSelectorHeader } from '../components/AccountSelectBox/AccountSelectorHeader'
import DialogContext from '../components/DialogContext'

const DialogContextApp = ({ children }) => {
const dialogContext = useCozyDialog({
size: 'l',
open: true,
onClose: null,
disableTitleAutoPadding: true
})
return (
<DialogContext.Provider value={dialogContext}>
{children}
</DialogContext.Provider>
)
}

const meta = {
title: 'AccountSelectorHeader',
component: AccountSelectorHeader,
tags: ['autodocs'],
argTypes: {
backgroundColor: { control: 'color' }
},
decorators: [
Story => {
return (
<BreakpointsProvider>
<DialogContextApp>{Story()}</DialogContextApp>
</BreakpointsProvider>
)
}
]
}

export default meta

export const Primary = {
args: {
konnector: { slug: 'test-konnector' },
account: { _id: 'test-account' },
accountsAndTriggers: [{}],
pushHistory: () => {},
replaceHistory: () => {}
}
}
39 changes: 0 additions & 39 deletions packages/cozy-harvest-lib/src/stories/Button.stories.ts

This file was deleted.

53 changes: 0 additions & 53 deletions packages/cozy-harvest-lib/src/stories/Button.tsx

This file was deleted.

0 comments on commit 990773d

Please sign in to comment.