Remove deprecated InputGroupAddon

This commit is contained in:
Thor77 2022-06-10 21:53:40 +02:00
parent 0c61fcf570
commit c34831610a
No known key found for this signature in database
GPG Key ID: 5051E71B46AA669A
4 changed files with 13 additions and 23 deletions

View File

@ -1,5 +1,5 @@
import React from 'react'; import React from 'react';
import {Button, Input, InputGroup, InputGroupAddon, Table} from 'reactstrap'; import {Button, Input, InputGroup, Table} from 'reactstrap';
export function EditableMatchTable(props) { export function EditableMatchTable(props) {
return (<Table className='mb-0'> return (<Table className='mb-0'>
@ -49,12 +49,10 @@ class ScoreInput extends React.Component {
render() { render() {
return (<InputGroup> return (<InputGroup>
<InputGroupAddon addonType="prepend"><Button onClick={this.decreaseScore} color='danger' <Button onClick={this.decreaseScore} color='danger' outline={true}>-1</Button>
outline={true}>-1</Button></InputGroupAddon>
<Input className='font-weight-bold' value={this.state.score} onChange={this.inputScore} type='number' <Input className='font-weight-bold' value={this.state.score} onChange={this.inputScore} type='number'
step='1' placeholder='0'/> step='1' placeholder='0'/>
<InputGroupAddon addonType="append"><Button onClick={this.increaseScore} <Button onClick={this.increaseScore} color='success'>+1</Button>
color='success'>+1</Button></InputGroupAddon>
</InputGroup>); </InputGroup>);
} }
} }

View File

@ -1,6 +1,6 @@
import React from 'react'; import React from 'react';
import { import {
Alert, Button, Card, CardBody, CardTitle, Input, InputGroup, InputGroupAddon Alert, Button, Card, CardBody, CardTitle, Input, InputGroup
} from 'reactstrap'; } from 'reactstrap';
export default class EditableStringList extends React.Component { export default class EditableStringList extends React.Component {
@ -231,10 +231,8 @@ class StringInput extends React.Component {
return false; return false;
} }
}}/> }}/>
<InputGroupAddon addonType="append"> <Button color="success" outline={true}
<Button color="success" outline={true} onClick={() => this.submit()}>{this.props.addButtonText}</Button>
onClick={() => this.submit()}>{this.props.addButtonText}</Button>
</InputGroupAddon>
</InputGroup>); </InputGroup>);
} }

View File

@ -1,20 +1,16 @@
import React from 'react'; import React from 'react';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import {Button, InputGroup, InputGroupAddon, Input} from 'reactstrap'; import {Button, InputGroup, Input} from 'reactstrap';
export default class NumericInput extends React.Component { export default class NumericInput extends React.Component {
render() { render() {
return (<InputGroup> return (<InputGroup>
<InputGroupAddon addonType="prepend"> <Button onClick={this.props.decrementCallback} className="btn-width" color={this.props.decrementColor}
<Button onClick={this.props.decrementCallback} className="btn-width" color={this.props.decrementColor} outline={this.props.decrementOutline}>{this.props.decrementText}</Button>
outline={this.props.decrementOutline}>{this.props.decrementText}</Button>
</InputGroupAddon>
<Input className='font-weight-bold' value={this.props.value} <Input className='font-weight-bold' value={this.props.value}
disabled type='number'/> disabled type='number'/>
<InputGroupAddon addonType="append"> <Button onClick={this.props.incrementCallback} className="btn-width" color={this.props.incrementColor}
<Button onClick={this.props.incrementCallback} className="btn-width" color={this.props.incrementColor} outline={this.props.incrementOutline}>{this.props.incrementText}</Button>
outline={this.props.incrementOutline}>{this.props.incrementText}</Button>
</InputGroupAddon>
</InputGroup>); </InputGroup>);
} }
} }

View File

@ -1,6 +1,6 @@
import Head from 'next/head'; import Head from 'next/head';
import React, {Component} from 'react'; import React, {Component} from 'react';
import {Button, Container, Form, Input, InputGroup, InputGroupAddon, Table} from 'reactstrap'; import {Button, Container, Form, Input, InputGroup, Table} from 'reactstrap';
import {TurniereNavigation} from '../js/components/Navigation'; import {TurniereNavigation} from '../js/components/Navigation';
import {BigImage} from '../js/components/BigImage'; import {BigImage} from '../js/components/BigImage';
@ -87,9 +87,7 @@ class NewMailAddressInput extends Component {
<InputGroup> <InputGroup>
<Input type='email' placeholder={this.props.email} onChange={this.onChange} value={this.state.email} <Input type='email' placeholder={this.props.email} onChange={this.onChange} value={this.state.email}
required/> required/>
<InputGroupAddon addonType='append'> <Button color='primary' type='submit'>eintragen</Button>
<Button color='primary' type='submit'>eintragen</Button>
</InputGroupAddon>
</InputGroup> </InputGroup>
</Form>); </Form>);
} }