Renders a text block placeholder.
Represents the configuration for a text block placeholder. It has the following attributes:
backgroundColor
: takes a Css.Color
and represents the background color of the lines.height
: takes a Css.Px
and represents the height of the lines.items
: a list of integers which is used to randomize the number of lines.default : Block
Returns a default configuration for a block placeholder.
withItems : List Basics.Int -> Block -> Block
Adds items
to a Block
.
withHeight : Css.Px -> Block -> Block
Adds height
to a Block
.
withBackgroundColor : Css.Color -> Block -> Block
Adds backgroundColor
to a Block
.
init : Block -> ( Block, Platform.Cmd.Cmd Msg )
Inits a block placeholder shuffling its items.
Block msg.
update : Msg -> Block -> ( Block, Platform.Cmd.Cmd Msg )
Block update.
view : Block -> Html.Styled.Html msg
Renders a block placeholder using the given configuration.