A hook for displaying a snackbar with an action button.

  • Parameters

    • Optionaloptions: Partial<IParams>

      Optional parameters for the snackbar.

      • duration

        The duration in milliseconds for which the snackbar is displayed.

    Returns {
        close: () => Promise<void>;
        pickData: (__namedParameters: ISnack) => Promise<boolean>;
        render: () => Element;
    }

    An object with two methods:

    • render: A method that renders the snackbar.
    • pickData: A method that displays the snackbar and waits for the user response.