【发布时间】:2022-02-17 05:27:49
【问题描述】:
有这样一个问题,但答案不是很清楚,我没有足够的“分”来评论它。
我阅读了https://react-bootstrap.github.io/components/buttons/ 和其他一些文档,但找不到我的答案。
我以这篇文章为指导:https://www.pluralsight.com/guides/how-to-position-react-bootstrap-popover
import Popover from 'react-bootstrap/Popover';
import OverlayTrigger from 'react-bootstrap/OverlayTrigger';
import Button from 'react-bootstrap/Button';
.
.
.
render() {
const popover = (
<Popover id="popover-basic">
<Popover.Title as="h3">Popover title</Popover.Title>
<Popover.Content>
Popover content <strong>some strong content</strong> Normal content again
</Popover.Content>
</Popover>
);
return (
<div className='toggle container '>
<div className='form-row justify-content-center'>
<div className='col-6'>
<section class='inline-block'>
<span class="badge badge-pill badge-primary ml-2">1</span>
<h3>
Choose System Type:
</h3>
<div id="element1">
<OverlayTrigger trigger="hover" placement="right" overlay={popover}>
<Button variant="outline-primary" circle><i class="fas fa-question"></i></Button>
</OverlayTrigger>
</div>
</section>
</div>
</div>
</div>
我希望我的弹出按钮是一个圆圈,但我找不到有关如何做到这一点的文档。
【问题讨论】:
-
此链接中的答案可以帮助您 - stackoverflow.com/questions/65440623/…
标签: button react-bootstrap popover