git.iko.soy/rowtype-yoga/purescript-radix-ui
on main help sign in
Add container option to HoverCard Portal
6bfa7f4Mark Eibes
src/RadixUI/HoverCard.purs+3−1
@@ -20,6 +20,7 @@ import Control.Monad.Identity.Trans (runIdentityT)
20import Beta.DOM.Internal (CSS)
20import Beta.DOM.Internal (CSS)
21import Beta.DOM (class IsJSX)
21import Beta.DOM (class IsJSX)
22import Data.Time.Duration (Milliseconds)
22import Data.Time.Duration (Milliseconds)
23+import Web.HTML.HTMLElement (HTMLElement)
23
24
24-- The type of the HoverCard component props
25-- The type of the HoverCard component props
25type RootProps =
26type RootProps =
@@ -92,7 +93,8 @@ arrow props kids = React.element arrowImpl
92
93
93-- The type of the portal component props
94-- The type of the portal component props
94type HoverCardPortalProps =
95type HoverCardPortalProps =
96+ { container :: Opt HTMLElement -- ^ The DOM element to render the portal into
95− {}
97+ }
96
98
97-- The foreign component for the HoverCard portal
99-- The foreign component for the HoverCard portal
98foreign import portalImpl :: forall a. ReactComponent { | a }
100foreign import portalImpl :: forall a. ReactComponent { | a }