diff --git a/src/components/carousel/carousel.jsx b/src/components/carousel/carousel.jsx index e69539f..a3eab72 100644 --- a/src/components/carousel/carousel.jsx +++ b/src/components/carousel/carousel.jsx @@ -10,7 +10,11 @@ require('./carousel.scss'); */ var Carousel = React.createClass({ type: 'Carousel', + propTypes: { + items: React.PropTypes.array + }, render: function () { + /* TODO: allow override of default settings */ var settings = { dots: true, arrows: false, @@ -21,16 +25,10 @@ var Carousel = React.createClass({ speed: 500, cssEase: 'linear' }; - var images= [ - {id:'s1', url:'images/slide1.png'}, - {id:'s2', url:'images/slide2.png'}, - {id:'s3', url:'images/slide3.png'}, - {id:'s4', url:'images/slide4.png'}, - {id:'s5', url:'images/slide5.png'}, - ]; + return ( - {images.map((item, i) => { return (
) })} + {this.props.items.map((item) => { return (
) })}
); } diff --git a/src/components/navbar/navbar.jsx b/src/components/navbar/navbar.jsx index a35bf0c..a8f2b69 100755 --- a/src/components/navbar/navbar.jsx +++ b/src/components/navbar/navbar.jsx @@ -14,33 +14,33 @@ var NavBar = React.createClass({