DropButton

Type: React component

A utility component which renders a specified button using a render function and automatically anchors a Drop next to it when the drop is opened. The rendered Drop and its corresponding contents can also be specified using a render function.

Keyboard behavior:

  • Escape: close the Drop

Props

  1. isDisabled

    (Optional)

    Default value

  2. onDropToggled

    (Optional)

    Type: Function

    A callback that is called whenever the drop is toggled.

    Arguments

    Default value

  3. onRef

    (Optional)

  4. renderButton

    (Required)

    Type: Function

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

    Arguments

    Returns

  5. 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