deps: react-bootstrap 0.31 -> 2 (Bootstrap 5 CSS deferred as debt)
Removes the largest batch of React-19-blocking warnings: the 0.31 components (Grid, FormGroup, ControlLabel, Navbar.Header/Brand, Checkbox, SafeAnchor) all leaned on legacy context / defaultProps. 29 files converted: Grid->Container, FormGroup/ControlLabel/FormControl/ HelpBlock -> Form.Group/Label/Control/Text, Checkbox -> Form.Check (label as prop), bsStyle->variant (default->secondary), bsSize->size, pull-right->float-end. Custom Col.js now re-exports v2's Col; custom NavItem.js rewritten self-contained (no SafeAnchor/createChainedFunction); Navigation.js drops react-bootstrap Navbar (raw markup anyway). CSS stays on Bootstrap 4 (alexwine:bootstrap-4) for now: the BS4->5 jump is entangled with the jQuery carousel/swipe + navbar-collapse and is tracked as separate debt in UPGRADE.md. Only .form-label needed a shim (forms.scss). Browser-verified home carousel+navbar, signup form + terms checkbox, login form; REST smoke byte-identical.
This commit is contained in:
parent
12bdbe8fed
commit
a1a1b9a801
30 changed files with 539 additions and 333 deletions
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { FormGroup, ControlLabel, Button } from 'react-bootstrap';
|
||||
import { Form, Button } from 'react-bootstrap';
|
||||
import { Meteor } from 'meteor/meteor';
|
||||
import { Bert } from 'meteor/themeteorchef:bert';
|
||||
import validate from '../../../modules/validate';
|
||||
|
|
@ -57,8 +57,8 @@ class DocumentEditor extends React.Component {
|
|||
render() {
|
||||
const { doc } = this.props;
|
||||
return (<form ref={form => (this.form = form)} onSubmit={event => event.preventDefault()}>
|
||||
<FormGroup>
|
||||
<ControlLabel>Title</ControlLabel>
|
||||
<Form.Group>
|
||||
<Form.Label>Title</Form.Label>
|
||||
<input
|
||||
type="text"
|
||||
className="form-control"
|
||||
|
|
@ -67,9 +67,9 @@ class DocumentEditor extends React.Component {
|
|||
defaultValue={doc && doc.title}
|
||||
placeholder="Oh, The Places You'll Go!"
|
||||
/>
|
||||
</FormGroup>
|
||||
<FormGroup>
|
||||
<ControlLabel>Body</ControlLabel>
|
||||
</Form.Group>
|
||||
<Form.Group>
|
||||
<Form.Label>Body</Form.Label>
|
||||
<textarea
|
||||
className="form-control"
|
||||
name="body"
|
||||
|
|
@ -77,8 +77,8 @@ class DocumentEditor extends React.Component {
|
|||
defaultValue={doc && doc.body}
|
||||
placeholder="Congratulations! Today is your day. You're off to Great Places! You're off and away!"
|
||||
/>
|
||||
</FormGroup>
|
||||
<Button type="submit" bsStyle="success">
|
||||
</Form.Group>
|
||||
<Button type="submit" variant="success">
|
||||
{doc && doc._id ? 'Save Changes' : 'Add Document'}
|
||||
</Button>
|
||||
</form>);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue