使用 React 的网格 bootstrap
Grids using react bootstrap
我想展示3张牌。我收到以下错误:
./src/views/Notifications.jsx
Line 28:8: 'Container' is not defined react/jsx-no-undef
搜索关键字以了解有关每个错误的更多信息。
import React, { Component } from "react";
import { Row, Col, Alert, Container} from "react-bootstrap";
import Button from "components/CustomButton/CustomButton.jsx";
import Typography from "views/Typography.jsx";
import { BrowserRouter as Router, Route, Redirect, Switch, Link, NavLink } from 'react-router-dom';
class Notifications extends Component {
render() {
return (
<Container>
<Row>
<Col>1 of 2</Col>
<Col>2 of 2</Col>
</Row>
<Row>
<Col>1 of 3</Col>
<Col>2 of 3</Col>
<Col>3 of 3</Col>
</Row>
</Container>
)}
}
尝试
import Container from 'react-bootstrap/Container'
https://react-bootstrap.github.io/layout/grid/#container-props
我想展示3张牌。我收到以下错误:
./src/views/Notifications.jsx Line 28:8: 'Container' is not defined react/jsx-no-undef
搜索关键字以了解有关每个错误的更多信息。
import React, { Component } from "react";
import { Row, Col, Alert, Container} from "react-bootstrap";
import Button from "components/CustomButton/CustomButton.jsx";
import Typography from "views/Typography.jsx";
import { BrowserRouter as Router, Route, Redirect, Switch, Link, NavLink } from 'react-router-dom';
class Notifications extends Component {
render() {
return (
<Container>
<Row>
<Col>1 of 2</Col>
<Col>2 of 2</Col>
</Row>
<Row>
<Col>1 of 3</Col>
<Col>2 of 3</Col>
<Col>3 of 3</Col>
</Row>
</Container>
)}
}
尝试
import Container from 'react-bootstrap/Container'
https://react-bootstrap.github.io/layout/grid/#container-props