diff --git a/js/components/NumericInput.js b/js/components/NumericInput.js new file mode 100644 index 0000000..478f2cb --- /dev/null +++ b/js/components/NumericInput.js @@ -0,0 +1,48 @@ +import React from 'react'; +import PropTypes from 'prop-types'; +import {Button, InputGroup, InputGroupAddon, Input} from 'reactstrap'; +import '../../static/css/numericinput.css'; + +export default class NumericInput extends React.Component { + render() { + return ( + + + + + + + + ); + } +} + +NumericInput.propTypes = { + decrementText: PropTypes.string.isRequired, + decrementCallback: PropTypes.func.isRequired, + decrementColor: PropTypes.oneOf([ + 'primary', 'secondary', 'success', 'info', 'warning', 'danger' + ]), + decrementOutline: PropTypes.bool, + + + incrementText: PropTypes.string.isRequired, + incrementCallback: PropTypes.func.isRequired, + incrementColor: PropTypes.oneOf([ + 'primary', 'secondary', 'success', 'info', 'warning', 'danger' + ]), + incrementOutline: PropTypes.bool, + + value: PropTypes.number.isRequired +}; + +NumericInput.defaultProps = { + decrementColor: 'primary', + decrementOutline: true, + + incrementColor: 'primary', + incrementOutline: true +}; diff --git a/pages/create.js b/pages/create.js index 9eca46d..9165c1b 100644 --- a/pages/create.js +++ b/pages/create.js @@ -3,16 +3,15 @@ import React from 'react'; import {notify} from 'react-notify-toast'; import {connect} from 'react-redux'; import posed from 'react-pose'; -import {Button, Card, CardBody, Container, CustomInput, Form, FormGroup, - Input, InputGroup, InputGroupAddon, Label} from 'reactstrap'; +import {Button, Card, CardBody, Col, Container, CustomInput, Form, FormGroup, Input, Label} from 'reactstrap'; import {TurniereNavigation} from '../js/components/Navigation'; import {Footer} from '../js/components/Footer'; import EditableStringList from '../js/components/EditableStringList'; import {createTournament} from '../js/api'; import '../static/css/everypage.css'; -import '../static/css/create.css'; import RequireLogin from '../js/components/RequireLogin'; +import NumericInput from '../js/components/NumericInput'; class CreatePage extends React.Component { render() { @@ -109,34 +108,20 @@ class CreateTournamentForm extends React.Component { className="groupphasefader"> - - - - - - - - - + + + - - - - - - - - - + weiterkommen? + + + diff --git a/static/css/create.css b/static/css/numericinput.css similarity index 100% rename from static/css/create.css rename to static/css/numericinput.css