threepenny-gui-flexbox-0.4.2: Flexbox layouts for Threepenny-gui.

Safe HaskellNone
LanguageHaskell2010

Graphics.UI.Threepenny.Ext.Flexbox

Contents

Synopsis

Parent Properties

data ParentProps Source #

Properties for a parent.

Instances

ToStyle ParentProps Source #

Convert parent properties to Threepenny style.

Parent Property Constructors

parentProps :: ParentProps Source #

Default properties for a parent.

Child Properties

data ChildProps Source #

Properties for a child.

Instances

ToStyle ChildProps Source #

Convert child properties to Threepenny style.

Child Property Constructors

childProps :: ChildProps Source #

Default properties for a child.

Core Functions

class ToStyle a where Source #

Convert to Threepenny style.

Minimal complete definition

toStyle

Methods

toStyle :: a -> [(String, String)] Source #

Instances

ToStyle Rule Source #

Convert a Clay Property to Threepnny style.

Methods

toStyle :: Rule -> [(String, String)] Source #

ToStyle ChildProps Source #

Convert child properties to Threepenny style.

ToStyle ParentProps Source #

Convert parent properties to Threepenny style.

setFlex :: ToStyle a => a -> UI Element -> UI Element Source #

Set Flexbox properties on an element.

Useful Abstractions

flex Source #

Arguments

:: 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.

flex_p Source #

Arguments

:: 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.

flex_c Source #

Arguments

:: UI Element

Parent

-> ParentProps

Parent Flexbox properties

-> [UI Element]

Children

-> UI Element

Parent with attached children

Like flex but apply default properties to the children.

flex_pc Source #

Arguments

:: UI Element

Parent

-> [UI Element]

Children

-> UI Element

Parent with attached children

Like flex but apply default properties to the parent and children.