threepenny-gui-flexbox-0.3.0.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.

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.

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.

flexbox 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, with given Flexbox properties applied.

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

Set Flexbox properties on an element.

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

Helper Functions

column :: UI Element -> [UI Element] -> UI Element Source #

Attach elements to a parent element with flex-direction column.

row :: UI Element -> [UI Element] -> UI Element Source #

Attach elements to a parent element with default Flexbox properties.