[英]React-Bootstrap tabs
I am using react-bootstrap to create 2 tabs which will display some data i pull from an api, but they seem to be displaying as buttons.我正在使用 react-bootstrap 创建 2 个选项卡,它们将显示我从 api 中提取的一些数据,但它们似乎显示为按钮。
my tabs:我的标签: documentation:文档:
I am importing them correctly (i think) other react bootstrap components from here are working fine我正在正确导入它们(我认为)这里的其他反应引导组件工作正常
import {
FormGroup,
FormLabel,
FormControl,
FormText,
Button,
Tooltip,
OverlayTrigger,
Tabs,
Tab,
} from "react-bootstrap";
and this is how i use them这就是我使用它们的方式
<Tabs defaultActiveKey={2}
id="uncontrolled-tab-example"
className="nav-item"
>
<Tab eventKey={1} title="Full">
<br />
<MaverickFullResult items={this.state.results} />
</Tab>
<Tab eventKey={2} title="Summary">
<br />
<MaverickSummaryResult items={this.state.results} />
</Tab>
</Tabs>
You need to import below css file in index.js您需要在 index.js 中的 css 文件下方导入
import 'bootstrap/dist/css/bootstrap.min.css';
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.