Kino.Toast.Icons (kino_toast v0.1.2)

View Source

Provides a type-safe list of all supported free FontAwesome icons.

Summary

Types

A string representing a supported FontAwesome icon.

Functions

Generates a FontAwesome HTML tag for the icon with the given text color. Raises if invalid.

Returns the list of valid FontAwesome free icon names.

Validates whether the given string is a supported icon.

Types

fa_icon()

@type fa_icon() :: String.t()

A string representing a supported FontAwesome icon.

See the full list in Kino.Toast.Icons.icons/0 or visit FontAwesome Free Icons.

Functions

html(icon, color \\ "#000")

@spec html(fa_icon(), String.t()) :: String.t()

Generates a FontAwesome HTML tag for the icon with the given text color. Raises if invalid.

icons()

@spec icons() :: [String.t()]

Returns the list of valid FontAwesome free icon names.

valid?(icon)

@spec valid?(String.t()) :: boolean()

Validates whether the given string is a supported icon.