bigardone / elm-css-placeholders / Placeholders.Triangle

Renders a triangle placeholder.

Definition


type Triangle

Represents the configuration for a triangle placeholder


type Corner
    = Top
    | Right
    | Bottom
    | Left

Represents a triangle corner.

default : Triangle

Returns a default configuration for a triangle placeholder.

withBottomCorner : Triangle -> Triangle

Sets the bottom corner to a given triangle.

withLeftCorner : Triangle -> Triangle

Sets the left corner to a given triangle.

withRightCorner : Triangle -> Triangle

Sets the right corner to a given triangle.

withBackgroundColor : Css.Color -> Triangle -> Triangle

Adds backgroundColor to a Triangle.

withSize : Css.Px -> Triangle -> Triangle

Adds size to a Triangle.

View

view : Triangle -> Html.Styled.Html msg

Renders a triangle placeholder using the given configuration.