Merge branch 'feat/inda-383-daily-stat' into 'main'
[ProtonMail-WebClient.git] / applications / drive / src / app / components / sections / Drive / ToolbarButtons / CreateNewFileButton.tsx
bloba464323383f6506fa647720f4cf12bd38dfe8170
1 import { c } from 'ttag';
3 import { Icon, ToolbarButton } from '@proton/components';
5 import { useCreateFileModal } from '../../../modals/CreateFileModal';
7 const CreateNewFileButton = () => {
8     const [createFileModal, showCreateFileModal] = useCreateFileModal();
10     return (
11         <>
12             <ToolbarButton
13                 icon={<Icon name="file" alt={c('Action').t`Create new text file`} />}
14                 title={c('Action').t`Create new text file`}
15                 onClick={() => showCreateFileModal({})}
16                 data-testid="toolbar-create-file"
17             />
18             {createFileModal}
19         </>
20     );
23 export default CreateNewFileButton;