From 0fe77083aac6cfcb26d6187096259ca642524090 Mon Sep 17 00:00:00 2001 From: Brynjulf Risbakken Date: Tue, 29 Oct 2024 06:58:29 +0100 Subject: [PATCH] :technologist: expose mouse event in snackbar actions --- src/providers/SnackbarProvider/SnackbarProvider.tsx | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/providers/SnackbarProvider/SnackbarProvider.tsx b/src/providers/SnackbarProvider/SnackbarProvider.tsx index 77ce90c04..555585ddf 100644 --- a/src/providers/SnackbarProvider/SnackbarProvider.tsx +++ b/src/providers/SnackbarProvider/SnackbarProvider.tsx @@ -1,4 +1,11 @@ -import { createContext, FC, ReactNode, useContext, useState } from 'react'; +import { + createContext, + FC, + MouseEvent, + ReactNode, + useContext, + useState, +} from 'react'; import { Button, @@ -16,7 +23,7 @@ interface ShowSnackbarSettings { customProps?: SnackbarProps; action?: { text: string; - handler: () => void; + handler: (event: MouseEvent) => void; disabled?: boolean; }; }