ImportData: move FileChooserCSV params into CSVImporter
This commit is contained in:
parent
e6e4a5c447
commit
0666557282
2 changed files with 4 additions and 10 deletions
|
@ -264,11 +264,3 @@ export const FileChooserLogo = props => (
|
|||
FileChooserLogo.defaultProps = {
|
||||
accept: ['image/svg', 'image/png'],
|
||||
};
|
||||
|
||||
export const FileChooserCSV = props => (
|
||||
<SimpleInput type='file' {...props} />
|
||||
);
|
||||
|
||||
FileChooserCSV.defaultProps = {
|
||||
accept: ['text/csv'],
|
||||
};
|
||||
|
|
|
@ -4,9 +4,9 @@ import { injectIntl } from 'react-intl';
|
|||
import ImmutablePureComponent from 'react-immutable-pure-component';
|
||||
import PropTypes from 'prop-types';
|
||||
import {
|
||||
SimpleInput,
|
||||
SimpleForm,
|
||||
FieldsGroup,
|
||||
FileChooserCSV,
|
||||
} from 'soapbox/features/forms';
|
||||
|
||||
export default @connect()
|
||||
|
@ -55,7 +55,9 @@ class CSVImporter extends ImmutablePureComponent {
|
|||
<FieldsGroup>
|
||||
<div className='fields-row file-picker'>
|
||||
<div className='fields-row__column fields-group fields-row__column-6'>
|
||||
<FileChooserCSV
|
||||
<SimpleInput
|
||||
type='file'
|
||||
accept={['.csv', 'text/csv']}
|
||||
label={intl.formatMessage(messages.input_label)}
|
||||
hint={intl.formatMessage(messages.input_hint)}
|
||||
onChange={this.handleFileChange}
|
||||
|
|
Loading…
Reference in a new issue