overleaf/services/web/frontend/stories/modals/create-file/create-file-modal-footer.stories.js
Alf Eaton 7c97f8ab6e Switch to new JSX runtime (#4225)
* Use new JSX runtime and update Babel Node target
* Update .eslintrc
* Remove React imports

GitOrigin-RevId: 559de0267f8f2934c56a860ea8701bb522aa861a
2021-06-24 02:06:59 +00:00

62 lines
1.3 KiB
JavaScript

import {
ModalFooterDecorator,
ModalContentDecorator,
} from '../modal-decorators'
import { FileTreeModalCreateFileFooterContent } from '../../../js/features/file-tree/components/file-tree-create/file-tree-modal-create-file-footer'
export const Valid = args => <FileTreeModalCreateFileFooterContent {...args} />
export const Invalid = args => (
<FileTreeModalCreateFileFooterContent {...args} />
)
Invalid.args = {
valid: false,
}
export const Inflight = args => (
<FileTreeModalCreateFileFooterContent {...args} />
)
Inflight.args = {
inFlight: true,
}
export const FileLimitWarning = args => (
<FileTreeModalCreateFileFooterContent {...args} />
)
FileLimitWarning.args = {
fileCount: {
status: 'warning',
value: 1990,
limit: 2000,
},
}
export const FileLimitError = args => (
<FileTreeModalCreateFileFooterContent {...args} />
)
FileLimitError.args = {
fileCount: {
status: 'error',
value: 2000,
limit: 2000,
},
}
export default {
title: 'Modals / Create File / Footer',
component: FileTreeModalCreateFileFooterContent,
args: {
fileCount: {
status: 'success',
limit: 10,
value: 1,
},
valid: true,
inFlight: false,
newFileCreateMode: 'doc',
},
argTypes: {
cancel: { action: 'cancel' },
},
decorators: [ModalFooterDecorator, ModalContentDecorator],
}