@bigfishtv/cockpit
Version:
29 lines (25 loc) • 576 B
JavaScript
import PropTypes from 'prop-types'
import React, { Component } from 'react'
/**
* Just DropdownItem with a status icon
*/
export default class DropdownItem extends Component {
static propTypes = {
text: PropTypes.node,
stats: PropTypes.string,
}
static defaultProps = {
text: 'Status Item',
status: 'default',
onClick: () => console.warn('no onClick event set for DropdownStatusItem'),
}
render() {
return (
<li>
<a onClick={this.props.onClick}>
<span className={'status ' + this.props.status} /> {this.props.text}
</a>
</li>
)
}
}