WiP updates

This commit is contained in:
Tomas Bures 2018-04-22 09:00:04 +02:00
parent 6706d93bc1
commit 4fce4b6f81
27 changed files with 763 additions and 85 deletions

View file

@ -123,6 +123,32 @@ class DropdownMenu extends Component {
}
}
class DropdownMenuItem extends Component {
static propTypes = {
label: PropTypes.string,
icon: PropTypes.string,
className: PropTypes.string
}
render() {
const props = this.props;
let className = 'dropdown';
if (props.className) {
className = className + ' ' + props.className;
}
return (
<li className={className}>
<a href="#" className="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">{props.icon && <Icon icon={props.icon}/>}{props.label}{' '}<span className="caret"></span></a>
<ul className="dropdown-menu">
{props.children}
</ul>
</li>
);
}
}
@withErrorHandling
class ActionLink extends Component {
static propTypes = {
@ -261,6 +287,7 @@ class ModalDialog extends Component {
export {
Button,
DropdownMenu,
DropdownMenuItem,
ActionLink,
DismissibleAlert,
ModalDialog,