parent
537f8a6ce1
commit
4e446410eb
@ -0,0 +1,24 @@ |
||||
import React, {Component, PropTypes} from 'react' |
||||
|
||||
export default class Breadcrumbs extends Component { |
||||
|
||||
static propTypes = { |
||||
total: PropTypes.number, |
||||
currentIndex: PropTypes.number |
||||
}; |
||||
|
||||
render() { |
||||
const {total, currentIndex} = this.props |
||||
return ( |
||||
<div className="breadcrumbs"> |
||||
{Array(total).fill().map((_, i) => ( |
||||
<div |
||||
className="breadcrumb" |
||||
style={{backgroundColor: i === currentIndex ? '#D8D8D8' : '#FFFFFF'}} |
||||
/> |
||||
))} |
||||
</div> |
||||
); |
||||
} |
||||
|
||||
} |
Loading…
Reference in new issue