mirror of
https://github.com/strapi/strapi.git
synced 2025-09-25 08:19:07 +00:00
Created InputFileWithErrors component and add it to the index
This commit is contained in:
parent
8e73ff6e0b
commit
0013e90eb0
@ -0,0 +1,29 @@
|
||||
/**
|
||||
*
|
||||
* InputFileWithErrors
|
||||
*
|
||||
*/
|
||||
|
||||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import cn from 'classnames';
|
||||
|
||||
// Design
|
||||
import Label from 'components/Label';
|
||||
import InputDescription from 'components/InputDescription';
|
||||
import InputFile from 'components/InputFile';
|
||||
|
||||
class InputFileWithErrors extends React.Component {
|
||||
// TODO handle errors lifecycle
|
||||
render() {
|
||||
return (
|
||||
<div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
InputFileWithErrors.defaultProps = {};
|
||||
InputFileWithErrors.propTypes = {};
|
||||
|
||||
export default InputFileWithErrors;
|
@ -1,6 +1,6 @@
|
||||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { includes, isEmpty, isFunction, mapKeys, reject } from 'lodash';
|
||||
import { includes, isEmpty, isFunction } from 'lodash';
|
||||
import cn from 'classnames';
|
||||
|
||||
// Design
|
||||
|
@ -12,6 +12,7 @@ import InputAddonWithErrors from 'components/InputAddonWithErrors';
|
||||
import InputCheckboxWithErrors from 'components/InputCheckboxWithErrors';
|
||||
import InputDateWithErrors from 'components/InputDateWithErrors';
|
||||
import InputEmailWithErrors from 'components/InputEmailWithErrors';
|
||||
import InputFileWithErrors from 'components/InputFileWithErrors';
|
||||
import InputNumberWithErrors from 'components/InputNumberWithErrors';
|
||||
import InputSearchWithErrors from 'components/InputSearchWithErrors';
|
||||
import InputSelectWithErrors from 'components/InputSelectWithErrors';
|
||||
@ -27,6 +28,7 @@ const inputs = {
|
||||
checkbox: InputCheckboxWithErrors,
|
||||
date: InputDateWithErrors,
|
||||
email: InputEmailWithErrors,
|
||||
file: InputFileWithErrors,
|
||||
number: InputNumberWithErrors,
|
||||
password: InputPasswordWithErrors,
|
||||
search: InputSearchWithErrors,
|
||||
@ -63,6 +65,7 @@ export {
|
||||
InputCheckboxWithErrors,
|
||||
InputDateWithErrors,
|
||||
InputEmailWithErrors,
|
||||
InputFileWithErrors,
|
||||
InputNumberWithErrors,
|
||||
InputPasswordWithErrors,
|
||||
InputSearchWithErrors,
|
||||
|
@ -11,7 +11,7 @@ import { createStructuredSelector } from 'reselect';
|
||||
import { injectIntl } from 'react-intl';
|
||||
import { bindActionCreators, compose } from 'redux';
|
||||
|
||||
import InputFile from 'components/InputFile';
|
||||
import Input from 'components/InputsIndex';
|
||||
import injectReducer from 'utils/injectReducer';
|
||||
import injectSaga from 'utils/injectSaga';
|
||||
|
||||
@ -35,11 +35,12 @@ export class HomePage extends React.Component {
|
||||
return (
|
||||
<div className={styles.homePage} style={{ paddingTop: '98px', marginLeft: '100px'}}>
|
||||
<form>
|
||||
<InputFile
|
||||
<Input
|
||||
name="test"
|
||||
value={this.state.value}
|
||||
onChange={this.onChange}
|
||||
/>
|
||||
type="file"
|
||||
/>
|
||||
</form>
|
||||
</div>
|
||||
);
|
||||
|
Loading…
x
Reference in New Issue
Block a user