|
|
@ -184,7 +184,7 @@ export default class Dropdown extends React.PureComponent {
|
|
|
|
icon: PropTypes.string.isRequired,
|
|
|
|
icon: PropTypes.string.isRequired,
|
|
|
|
items: PropTypes.array.isRequired,
|
|
|
|
items: PropTypes.array.isRequired,
|
|
|
|
size: PropTypes.number.isRequired,
|
|
|
|
size: PropTypes.number.isRequired,
|
|
|
|
ariaLabel: PropTypes.string,
|
|
|
|
title: PropTypes.string,
|
|
|
|
disabled: PropTypes.bool,
|
|
|
|
disabled: PropTypes.bool,
|
|
|
|
status: ImmutablePropTypes.map,
|
|
|
|
status: ImmutablePropTypes.map,
|
|
|
|
isUserTouching: PropTypes.func,
|
|
|
|
isUserTouching: PropTypes.func,
|
|
|
@ -197,7 +197,7 @@ export default class Dropdown extends React.PureComponent {
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
static defaultProps = {
|
|
|
|
static defaultProps = {
|
|
|
|
ariaLabel: 'Menu',
|
|
|
|
title: 'Menu',
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
state = {
|
|
|
|
state = {
|
|
|
@ -277,14 +277,14 @@ export default class Dropdown extends React.PureComponent {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
render () {
|
|
|
|
render () {
|
|
|
|
const { icon, items, size, ariaLabel, disabled, dropdownPlacement, openDropdownId, openedViaKeyboard } = this.props;
|
|
|
|
const { icon, items, size, title, disabled, dropdownPlacement, openDropdownId, openedViaKeyboard } = this.props;
|
|
|
|
const open = this.state.id === openDropdownId;
|
|
|
|
const open = this.state.id === openDropdownId;
|
|
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
return (
|
|
|
|
<div>
|
|
|
|
<div>
|
|
|
|
<IconButton
|
|
|
|
<IconButton
|
|
|
|
icon={icon}
|
|
|
|
icon={icon}
|
|
|
|
title={ariaLabel}
|
|
|
|
title={title}
|
|
|
|
active={open}
|
|
|
|
active={open}
|
|
|
|
disabled={disabled}
|
|
|
|
disabled={disabled}
|
|
|
|
size={size}
|
|
|
|
size={size}
|
|
|
|