【发布时间】:2020-12-24 23:24:25
【问题描述】:
我尝试仅使用引导程序将右侧的按钮内联。
const todoList = ({ todos }) => {
return (
<div>
<ListGroup>
{todos.map((todo) => {
return (
<div key={todo.todo_id} className="">
<ListGroupItem
className="mt-1 mx-5 text-center rounded-pill inline"
color="success"
>
<h5 className=""> {todo.content}</h5>
<button type="button" className=" btn btn-dark rounded-pill ">
Dark
</button>
</ListGroupItem>
</div>
);
})}
</ListGroup>
</div>
);
};
我尝试使用 form 和 flex 选项但没有成功。它以一种奇怪的小气泡呈现给我。
【问题讨论】:
-
检查您的应用程序中使用的引导程序版本。
-
如果我们认为子代码是正确的,那么我们可以检查父代码。有时我们会得到解决方案。
标签: javascript twitter-bootstrap bootstrap-4 reactstrap