FlintUI.API.Attribute (FlintUI v0.1.0)

Phoenix LiveView attribute helpers.

Summary

Functions

Tries to convert an user input value to a boolean value and returns a default value if the conversion fails.

Tries to convert an user input value value to an integer value and returns a default value if the conversion fails.

Defines a class attribute for the component trying to fetch the default value from the theme if no default value is provided.

Defines a radius attribute for the component trying to fetch the default value and values list from the theme if no values are provided for those.

Defines a size attribute for the component trying to fetch the default value and values list from the theme if no values are provided for those.

Functions

Link to this function

as_boolean(value, default \\ false)

Tries to convert an user input value to a boolean value and returns a default value if the conversion fails.

Link to this function

as_integer(value, default \\ nil)

Tries to convert an user input value value to an integer value and returns a default value if the conversion fails.

Link to this macro

color(opts \\ [])

(macro)

Defines a class attribute for the component trying to fetch the default value from the theme if no default value is provided.

Link to this macro

radius(opts \\ [])

(macro)

Defines a radius attribute for the component trying to fetch the default value and values list from the theme if no values are provided for those.

Link to this macro

size(opts \\ [])

(macro)

Defines a size attribute for the component trying to fetch the default value and values list from the theme if no values are provided for those.