diff --git a/ui/src/shared/components/Dropdown.js b/ui/src/shared/components/Dropdown.js index b2b260462..a18589cd8 100644 --- a/ui/src/shared/components/Dropdown.js +++ b/ui/src/shared/components/Dropdown.js @@ -19,6 +19,9 @@ class Dropdown extends Component { static defaultProps = { actions: [], + buttonSize: 'btn-sm', + buttonColor: 'btn-info', + menuWidth: '100%', } handleClickOutside() { @@ -43,33 +46,35 @@ class Dropdown extends Component { } render() { - const {items, selected, className, iconName, actions, addNew} = this.props + const {items, selected, className, iconName, actions, addNew, buttonSize, buttonColor, menuWidth} = this.props const {isOpen} = this.state return ( -
-
- {iconName ? : null} +
+
+ {iconName ? : null} {selected}
{isOpen ? -
    +
      {items.map((item, i) => { return (
    • this.handleSelection(item)}> {item.text} -
      - {actions.map((action) => { - return ( - - ) - })} -
      + {actions.length > 0 ? +
      + {actions.map((action) => { + return ( + + ) + })} +
      + : null}
    • ) })} @@ -113,6 +118,9 @@ Dropdown.propTypes = { selected: string.isRequired, iconName: string, className: string, + buttonSize: string, + buttonColor: string, + menuWidth: string, } export default OnClickOutside(Dropdown)