mirror of
https://github.com/overleaf/overleaf.git
synced 2024-12-13 03:39:32 -05:00
ba4300d9e1
Migrate "Add Files" modal to React GitOrigin-RevId: fc5235108ee65294e3176da9c327791c34aa5b3c
33 lines
950 B
JavaScript
33 lines
950 B
JavaScript
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({
|
|
hasFeature: () => false
|
|
})
|
|
]
|
|
|
|
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) => ({
|
|
_id: `entity-${index}`
|
|
})),
|
|
fileRefs: [],
|
|
folders: []
|
|
}
|
|
]
|
|
})
|
|
]
|
|
|
|
export default {
|
|
title: 'Modals / Create File',
|
|
component: FileTreeModalCreateFile
|
|
}
|