2021-03-18 05:52:36 -04:00
|
|
|
import React from 'react'
|
|
|
|
import { createFileModalDecorator } from './create-file-modal-decorator'
|
|
|
|
import FileTreeModalCreateFile from '../../../js/features/file-tree/components/modals/file-tree-modal-create-file'
|
|
|
|
|
|
|
|
export const MinimalFeatures = args => <FileTreeModalCreateFile {...args} />
|
|
|
|
MinimalFeatures.decorators = [
|
|
|
|
createFileModalDecorator({
|
2021-04-27 03:52:58 -04:00
|
|
|
userHasFeature: () => false,
|
|
|
|
}),
|
2021-03-18 05:52:36 -04:00
|
|
|
]
|
|
|
|
|
|
|
|
export const WithExtraFeatures = args => <FileTreeModalCreateFile {...args} />
|
|
|
|
WithExtraFeatures.decorators = [createFileModalDecorator()]
|
|
|
|
|
|
|
|
export const FileLimitReached = args => <FileTreeModalCreateFile {...args} />
|
|
|
|
FileLimitReached.decorators = [
|
|
|
|
createFileModalDecorator({
|
|
|
|
rootFolder: [
|
|
|
|
{
|
|
|
|
docs: Array.from({ length: 10 }, (_, index) => ({
|
2021-04-27 03:52:58 -04:00
|
|
|
_id: `entity-${index}`,
|
2021-03-18 05:52:36 -04:00
|
|
|
})),
|
|
|
|
fileRefs: [],
|
2021-04-27 03:52:58 -04:00
|
|
|
folders: [],
|
|
|
|
},
|
|
|
|
],
|
|
|
|
}),
|
2021-03-18 05:52:36 -04:00
|
|
|
]
|
|
|
|
|
|
|
|
export default {
|
|
|
|
title: 'Modals / Create File',
|
2021-04-27 03:52:58 -04:00
|
|
|
component: FileTreeModalCreateFile,
|
2021-03-18 05:52:36 -04:00
|
|
|
}
|