2021-03-18 09:52:36 +00:00
|
|
|
import {
|
|
|
|
ModalFooterDecorator,
|
2021-04-27 07:52:58 +00:00
|
|
|
ModalContentDecorator,
|
2021-03-18 09:52:36 +00:00
|
|
|
} 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 = {
|
2021-04-27 07:52:58 +00:00
|
|
|
valid: false,
|
2021-03-18 09:52:36 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
export const Inflight = args => (
|
|
|
|
<FileTreeModalCreateFileFooterContent {...args} />
|
|
|
|
)
|
|
|
|
Inflight.args = {
|
2021-04-27 07:52:58 +00:00
|
|
|
inFlight: true,
|
2021-03-18 09:52:36 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
export const FileLimitWarning = args => (
|
|
|
|
<FileTreeModalCreateFileFooterContent {...args} />
|
|
|
|
)
|
|
|
|
FileLimitWarning.args = {
|
|
|
|
fileCount: {
|
|
|
|
status: 'warning',
|
|
|
|
value: 1990,
|
2021-04-27 07:52:58 +00:00
|
|
|
limit: 2000,
|
|
|
|
},
|
2021-03-18 09:52:36 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
export const FileLimitError = args => (
|
|
|
|
<FileTreeModalCreateFileFooterContent {...args} />
|
|
|
|
)
|
|
|
|
FileLimitError.args = {
|
|
|
|
fileCount: {
|
|
|
|
status: 'error',
|
|
|
|
value: 2000,
|
2021-04-27 07:52:58 +00:00
|
|
|
limit: 2000,
|
|
|
|
},
|
2021-03-18 09:52:36 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
export default {
|
|
|
|
title: 'Modals / Create File / Footer',
|
|
|
|
component: FileTreeModalCreateFileFooterContent,
|
|
|
|
args: {
|
|
|
|
fileCount: {
|
|
|
|
status: 'success',
|
|
|
|
limit: 10,
|
2021-04-27 07:52:58 +00:00
|
|
|
value: 1,
|
2021-03-18 09:52:36 +00:00
|
|
|
},
|
|
|
|
valid: true,
|
|
|
|
inFlight: false,
|
2021-04-27 07:52:58 +00:00
|
|
|
newFileCreateMode: 'doc',
|
2021-03-18 09:52:36 +00:00
|
|
|
},
|
|
|
|
argTypes: {
|
2021-04-27 07:52:58 +00:00
|
|
|
cancel: { action: 'cancel' },
|
2021-03-18 09:52:36 +00:00
|
|
|
},
|
2021-04-27 07:52:58 +00:00
|
|
|
decorators: [ModalFooterDecorator, ModalContentDecorator],
|
2021-03-18 09:52:36 +00:00
|
|
|
}
|