我的 jsx 文件成功识别了 react-bootstrap 元素,但它们没有样式。我项目的 node-modules 文件夹包含 react-bootstrap 和 bootstrap。为什么会这样?
var React = require('react');
var Button = require('react-bootstrap').Button;
var Jumbotron = require('react-bootstrap').Jumbotron;
var ReactComponentHi = React.createClass({displayName: 'Hi',
render: function() {
return (
<div>
<Button bsStyle='success'>
clickk
</Button>
<Jumbotron>
<h1>Hello, world!</h1>
<p>This is a simple hero unit, a simple jumbotron-style component for calling extra attention to featured content or information.</p>
<p><Button bsStyle='primary'>Learn more</Button></p>
</Jumbotron>
</div>
);
}
});
module.exports = ReactComponentHi;