Skip to content

Commit 2eb62b2

Browse files
committed
react-bootstrap & ie8 polyfill added
1 parent 816299d commit 2eb62b2

File tree

2 files changed

+24
-3
lines changed

2 files changed

+24
-3
lines changed

demo.html

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,26 @@
1919

2020
<body>
2121
<div id="root"></div>
22+
<!--[if lt IE 9]>
23+
<script>
24+
(function(){
25+
var ef = function(){};
26+
window.console = window.console || {log:ef,warn:ef,error:ef,dir:ef};
27+
}());
28+
</script>
29+
<script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.2/html5shiv.min.js"></script>
30+
<script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.2/html5shiv-printshiv.min.js"></script>
31+
<script src="//cdnjs.cloudflare.com/ajax/libs/es5-shim/3.4.0/es5-shim.js"></script>
32+
<script src="//cdnjs.cloudflare.com/ajax/libs/es5-shim/3.4.0/es5-sham.js"></script>
33+
<![endif]-->
2234
<!-- Load Babel -->
2335
<script src="http://code.jquery.com/jquery-3.2.0.min.js"></script>
2436
<!-- Latest compiled and minified JavaScript -->
2537
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
2638
<script src="https://unpkg.com/babel-standalone@6/babel.min.js"></script>
2739
<script src="https://unpkg.com/react@15/dist/react.js"></script>
2840
<script src="https://unpkg.com/react-dom@15/dist/react-dom.js"></script>
41+
<script src="https://cdnjs.cloudflare.com/ajax/libs/react-bootstrap/0.30.8/react-bootstrap.min.js"></script>
2942
<!-- Your custom script here -->
3043
<script type="text/babel" src="./jsx/app.jsx"></script>
3144
</body>

jsx/app.jsx

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,19 @@
1-
21
class Greeting extends React.Component {
32
render() {
4-
return <h1>Hello World!</h1>;
3+
return (
4+
<ReactBootstrap.Jumbotron>
5+
<h1>Hello, world!</h1>
6+
<p>This is a simple hero unit, a simple jumbotron-style component for calling extra attention to featured content or information.</p>
7+
<p><ReactBootstrap.Button bsStyle="primary">Learn more</ReactBootstrap.Button></p>
8+
</ReactBootstrap.Jumbotron>
9+
);
510
}
611
}
712

813
ReactDOM.render(
9-
<Greeting />,
14+
<ReactBootstrap.Grid>
15+
<Greeting />
16+
</ReactBootstrap.Grid>
17+
,
1018
document.getElementById('root')
1119
);

0 commit comments

Comments
 (0)