git.iko.soy/rowtype-yoga/purescript-radix-ui
on main help sign in
Add delays to HoverCard root
commit6357c45b222b13892666acfd842a203c7d80293e authorMark Eibes <mark.eibes@gmail.com> dateWed 25 Oct 2023, 13:29 (3 years ago) parenta05dfc3
1 file changed+3
src/RadixUI/HoverCard.purs+3
src/RadixUI/HoverCard.purs+3
@@ -19,6 +19,7 @@ import Data.Tuple.Nested ((/\))
1919import Control.Monad.Identity.Trans (runIdentityT)
2020import Beta.DOM.Internal (CSS)
2121import Beta.DOM (class IsJSX)
22+import Data.Time.Duration (Milliseconds)
2223
2324-- The type of the HoverCard component props
2425type RootProps =
@@ -26,6 +27,8 @@ type RootProps =
2627 , onOpenChange ::
2728 Opt (Boolean -> Effect Unit) -- ^ A callback function that is called when the HoverCard open state changes
2829 , className :: Opt String -- ^ The CSS class name of the HoverCard
30+ , openDelay :: Opt Milliseconds -- ^ The duration from when the mouse enters the trigger until the hover card opens
31+ , closeDelay :: Opt Milliseconds -- ^ The duration from when the mouse leaves the trigger until the hover card closes
2932 , style :: Opt CSS -- ^ The CSS style of the HoverCard
3033 }
3134