diff --git a/src/components/FormBlock.js b/src/components/FormBlock.js new file mode 100644 index 0000000..ad3c377 --- /dev/null +++ b/src/components/FormBlock.js @@ -0,0 +1,27 @@ +import { + Col, + FormGroup, + Input, + Label, +} from './Bootstrap'; + +export const FormBlock = ({ + children, + label, + name, + type='text', + ...props +}) => { + const formElement = (children !== undefined) + ? children + : + + return ( + + + + {formElement} + + + ); +}; diff --git a/src/components/index.js b/src/components/index.js index 448a961..483676b 100644 --- a/src/components/index.js +++ b/src/components/index.js @@ -1 +1,2 @@ export * from './Bootstrap'; +export * from './FormBlock'; diff --git a/src/views/Film/FilmAddView.js b/src/views/Film/FilmAddView.js index 953b93a..e23c482 100644 --- a/src/views/Film/FilmAddView.js +++ b/src/views/Film/FilmAddView.js @@ -10,6 +10,8 @@ import { Row, } from '../../components/Bootstrap' +import { FormBlock } from '../../components'; + export class FilmAddView extends Component { constructor (props) { super (props); @@ -23,24 +25,42 @@ export class FilmAddView extends Component { return (
- - - - - - - - - - + + + + + + + - + diff --git a/src/views/HomeView.js b/src/views/HomeView.js index 2034c93..835e5a7 100644 --- a/src/views/HomeView.js +++ b/src/views/HomeView.js @@ -24,12 +24,12 @@ export const HomeView = (props) => {
-

Welcome to Inferno

+

Welcome to Film Exif

- To get started, edit src/App.js and save to reload. + Drop files here.