Skip to content
Snippets Groups Projects
Commit 7f74c429 authored by Chris Beer's avatar Chris Beer
Browse files

Style the manifest form

parent 3e8dd4cc
No related branches found
No related tags found
No related merge requests found
...@@ -66,7 +66,7 @@ export class ManifestForm extends Component { ...@@ -66,7 +66,7 @@ export class ManifestForm extends Component {
*/ */
render() { render() {
const { formValue } = this.state; const { formValue } = this.state;
const { t, onCancel } = this.props; const { classes, t, onCancel } = this.props;
return ( return (
<form onSubmit={this.formSubmit}> <form onSubmit={this.formSubmit}>
<Grid container spacing={24}> <Grid container spacing={24}>
...@@ -80,6 +80,12 @@ export class ManifestForm extends Component { ...@@ -80,6 +80,12 @@ export class ManifestForm extends Component {
variant="filled" variant="filled"
label={t('addManifestUrl')} label={t('addManifestUrl')}
helperText={t('addManifestUrlHelp')} helperText={t('addManifestUrlHelp')}
InputLabelProps={{
shrink: true,
}}
InputProps={{
className: classes.input,
}}
/> />
</Grid> </Grid>
<Grid item sm={3}> <Grid item sm={3}>
...@@ -99,6 +105,7 @@ export class ManifestForm extends Component { ...@@ -99,6 +105,7 @@ export class ManifestForm extends Component {
} }
ManifestForm.propTypes = { ManifestForm.propTypes = {
classes: PropTypes.object, // eslint-disable-line react/forbid-prop-types
fetchManifest: PropTypes.func.isRequired, fetchManifest: PropTypes.func.isRequired,
onCancel: PropTypes.func, onCancel: PropTypes.func,
onSubmit: PropTypes.func, onSubmit: PropTypes.func,
...@@ -106,6 +113,7 @@ ManifestForm.propTypes = { ...@@ -106,6 +113,7 @@ ManifestForm.propTypes = {
}; };
ManifestForm.defaultProps = { ManifestForm.defaultProps = {
classes: {},
t: key => key, t: key => key,
onCancel: null, onCancel: null,
onSubmit: () => {}, onSubmit: () => {},
......
import { connect } from 'react-redux'; import { connect } from 'react-redux';
import { compose } from 'redux'; import { compose } from 'redux';
import { withTranslation } from 'react-i18next'; import { withTranslation } from 'react-i18next';
import { withStyles } from '@material-ui/core';
import * as actions from '../state/actions'; import * as actions from '../state/actions';
import { ManifestForm } from '../components/ManifestForm'; import { ManifestForm } from '../components/ManifestForm';
...@@ -10,8 +11,18 @@ import { ManifestForm } from '../components/ManifestForm'; ...@@ -10,8 +11,18 @@ import { ManifestForm } from '../components/ManifestForm';
* @private * @private
*/ */
const mapDispatchToProps = { fetchManifest: actions.fetchManifest }; const mapDispatchToProps = { fetchManifest: actions.fetchManifest };
/**
*
* @param theme
*/
const styles = theme => ({
input: {
...theme.typography.body1,
},
});
const enhance = compose( const enhance = compose(
withStyles(styles),
withTranslation(), withTranslation(),
connect(null, mapDispatchToProps), connect(null, mapDispatchToProps),
); );
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment