2021-03-18 05:52:36 -04:00
|
|
|
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'
|
2024-10-10 03:26:18 -04:00
|
|
|
import { bsVersionDecorator } from '../../../../.storybook/utils/with-bootstrap-switcher'
|
2021-03-18 05:52:36 -04:00
|
|
|
|
|
|
|
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 {
|
2022-03-28 06:23:21 -04:00
|
|
|
title: 'Editor / Modals / Create File / Footer',
|
2021-03-18 05:52:36 -04:00
|
|
|
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' },
|
2024-10-10 03:26:18 -04:00
|
|
|
...bsVersionDecorator.argTypes,
|
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
|
|
|
}
|