Safe Haskell | None |
---|---|
Language | Haskell2010 |
- data ParentProps = ParentProps {}
- parentProps :: ParentProps
- display :: Display -> ParentProps
- flexDirection :: FlexDirection -> ParentProps
- flexWrap :: FlexWrap -> ParentProps
- justifyContent :: JustifyContentValue -> ParentProps
- alignItems :: AlignItemsValue -> ParentProps
- aligContent :: AlignContentValue -> ParentProps
- data ChildProps = ChildProps {
- cOrder :: Int
- cFlexGrow :: Int
- cFlexShrink :: Int
- cFlexBasis :: Size LengthUnit
- cAlignSelf :: AlignSelfValue
- childProps :: ChildProps
- order :: Int -> ChildProps
- flexGrow :: Int -> ChildProps
- flexShrink :: Int -> ChildProps
- flexBasis :: Size LengthUnit -> ChildProps
- alignSelf :: AlignSelfValue -> ChildProps
- class ToStyle a where
- setProps :: ToStyle a => a -> UI Element -> UI Element
- flex :: UI Element -> ParentProps -> [(UI Element, ChildProps)] -> UI Element
- flex_p :: UI Element -> [(UI Element, ChildProps)] -> UI Element
- flex_c :: UI Element -> ParentProps -> [UI Element] -> UI Element
- flex_pc :: UI Element -> [UI Element] -> UI Element
Parent Properties
data ParentProps Source #
Properties for a parent.
ToStyle ParentProps Source # | Convert parent properties to Threepenny style. |
parentProps :: ParentProps Source #
Default properties for a parent.
Parent Property Helpers
display :: Display -> ParentProps Source #
flexWrap :: FlexWrap -> ParentProps Source #
Child Properties
data ChildProps Source #
Properties for a child.
ChildProps | |
|
ToStyle ChildProps Source # | Convert child properties to Threepenny style. |
childProps :: ChildProps Source #
Default properties for a child.
Child Property Helpers
order :: Int -> ChildProps Source #
flexGrow :: Int -> ChildProps Source #
flexShrink :: Int -> ChildProps Source #
flexBasis :: Size LengthUnit -> ChildProps Source #
alignSelf :: AlignSelfValue -> ChildProps Source #
Core Functions
setProps :: ToStyle a => a -> UI Element -> UI Element Source #
Set Flexbox properties on an element.
:: UI Element | Parent |
-> ParentProps | Parent Flexbox properties |
-> [(UI Element, ChildProps)] | Children and respective Flexbox properties |
-> UI Element | Parent with attached children |
Attach elements to a parent element, applying given Flexbox properties.
:: UI Element | Parent |
-> [(UI Element, ChildProps)] | Children and respective Flexbox properties |
-> UI Element | Parent with attached children |
Like flex
but apply default properties to the parent.