Reactstrap Progress not rendering

旧街凉风 提交于 2021-01-27 18:37:01

问题


I am trying to render a progress bar and a button using reactstrap@7.1.0. The button is rendered where as the progress bar is not rendered. What am i missing? Also bootstrap version is 4.2.1.

import React from 'react';
import { Progress,Button } from 'reactstrap';

const Home = (props) => {
  return (
    <div>
    <Button color="danger">Danger!</Button>
    <div className="text-center">25%</div>
    <Progress value="25" />
    here i am 


  </div>
  );
};

export default Home;

The following HTML code is rendered

<div class="progress">
<div class="progress-bar" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" style="width: 0%;">
</div>
</div>

回答1:


Missed out on importing bootstrap in index file

import 'bootstrap/dist/css/bootstrap.min.css';


来源:https://stackoverflow.com/questions/54618081/reactstrap-progress-not-rendering

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!