overleaf/services/web/frontend/stories/modals/create-file/create-file-modal.stories.js
Alf Eaton ee79728bf9 Only check a user's features for importing from reference provider (#3797)
GitOrigin-RevId: cc5a36be20c673f8941a2694eaeba80eebb4db6a
2021-03-25 03:04:57 +00:00

33 lines
954 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({
userHasFeature: () => 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
}