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