ButtonWithDrop

Type: React component

A DropButton which renders a Button with the specified props.

If you specify a handler for onClick, two Button components are rendered side by side where the first one has the specified label and icon and executes the specified onClick handler. The second one is rendered only with an angle-down (or angle-up) icon and controls the state of the drop.

Props

  1. icon

    (Optional)

    Type: FDS~Icon

    Default value

  2. isDisabled

    (Optional)

  3. isSelected

    (Optional)

    Default value

  4. label

    (Optional)

    Type: FDS~Label

    Default value

  5. onClick

    (Optional)

    Default value

  6. renderDrop

    (Required)

    Type: Function

    A callback that is called at every render of this component. Expects a valid React component instance of the desired drop and its contents to be returned.

    Arguments

  7. tooltipContent

    (Optional)

    Default value

  8. type

    (Optional)

    Type: String

    Allows you to override the background and border color from its default values (which are based on the context where you use the button; masthead / masthead tab buttons / toolbar) to one of either:

    • 'default'

    • 'primary'

    • 'transparent'

    • 'warning' Defaults to 'default', which is then interpreted based on the context.

    Default value