Safe Haskell | None |
---|---|
Language | Haskell2010 |
- data ParentProps = ParentProps {}
- parentProps :: ParentProps
- data ChildProps = ChildProps {
- cOrder :: Int
- cFlexGrow :: Int
- cFlexShrink :: Int
- cFlexBasis :: Size LengthUnit
- cAlignSelf :: AlignSelfValue
- childProps :: ChildProps
- class ToStyle a where
- flexbox :: UI Element -> ParentProps -> [(UI Element, ChildProps)] -> UI Element
- setProps :: ToStyle a => UI Element -> a -> UI Element
- toStyle :: ToStyle a => a -> [(String, String)]
- column :: UI Element -> [UI Element] -> UI Element
- row :: 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.
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.
Core Functions
:: 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, with given Flexbox properties applied.
setProps :: ToStyle a => UI Element -> a -> UI Element Source #
Set Flexbox properties on an element.