From fcc2502af592ac97b2dfcfceb932c2e8018e9058 Mon Sep 17 00:00:00 2001 From: Hendrik de Graaf Date: Tue, 3 Sep 2019 12:26:18 +0200 Subject: [PATCH] chore(file-input): implement file/folder structure and import extensions --- src/{FileInput/index.js => FileInput.js} | 16 ++++++++-------- src/FileInput/Placeholder.js | 2 +- src/FileInput/SelectedFile.js | 6 +++--- 3 files changed, 12 insertions(+), 12 deletions(-) rename src/{FileInput/index.js => FileInput.js} (89%) diff --git a/src/FileInput/index.js b/src/FileInput.js similarity index 89% rename from src/FileInput/index.js rename to src/FileInput.js index f14be20cd..8db8fd6de 100644 --- a/src/FileInput/index.js +++ b/src/FileInput.js @@ -3,14 +3,14 @@ import propTypes from 'prop-types' import cx from 'classnames' import { instanceOfComponent } from '@dhis2/prop-types' -import { statusPropType, sizePropType } from '../common-prop-types' -import { Button } from '../Button' -import { Help } from '../Help' -import { spacers, colors } from '../theme' -import { Upload } from '../icons/Upload' -import { StatusIconNoDefault } from '../icons/Status' -import { SelectedFile } from './SelectedFile' -import { Placeholder } from './Placeholder' +import { statusPropType, sizePropType } from './common-prop-types.js' +import { Button } from './Button.js' +import { Help } from './Help.js' +import { spacers, colors } from './theme.js' +import { Upload } from './icons/Upload.js' +import { StatusIconNoDefault } from './icons/Status.js' +import { SelectedFile } from './FileInput/SelectedFile.js' +import { Placeholder } from './FileInput/Placeholder.js' class FileInput extends PureComponent { ref = createRef() diff --git a/src/FileInput/Placeholder.js b/src/FileInput/Placeholder.js index 4124feb41..f0a08deeb 100644 --- a/src/FileInput/Placeholder.js +++ b/src/FileInput/Placeholder.js @@ -1,6 +1,6 @@ import React from 'react' import propTypes from 'prop-types' -import { colors, spacers } from '../theme' +import { colors, spacers } from '../theme.js' const Placeholder = ({ children }) => (

diff --git a/src/FileInput/SelectedFile.js b/src/FileInput/SelectedFile.js index 18b0736d0..4aafa42e9 100644 --- a/src/FileInput/SelectedFile.js +++ b/src/FileInput/SelectedFile.js @@ -1,9 +1,9 @@ import React from 'react' import propTypes from 'prop-types' -import { colors, spacers } from '../theme' -import { AttachFile } from '../icons/AttachFile' -import { Loading } from '../icons/Status' +import { colors, spacers } from '../theme.js' +import { AttachFile } from '../icons/AttachFile.js' +import { Loading } from '../icons/Status.js' const SelectedFile = ({ label,