What every component shares: ids, form fields and the color vocabulary.
The colors are LineOne's: neutral, primary, secondary, accent, info, success,
warning, error. In dark mode LineOne paints primary with accent, so every primary
style carries its dark: accent counterpart.
Summary
Functions
Fills id, name, value and errors from field when one is given.
"true" or "false", for data-* and aria-* attributes.
The color names every colored component accepts.
A unique DOM id, for a component that needs one and was not given it.
Turns an Ecto-style error tuple into text. Set your own translator with
Functions
Fills id, name, value and errors from field when one is given.
errors is the list of translated messages, shown only once the field has been used
(Phoenix.Component.used_input?/1).
"true" or "false", for data-* and aria-* attributes.
@spec colors() :: [String.t()]
The color names every colored component accepts.
A unique DOM id, for a component that needs one and was not given it.
Turns an Ecto-style error tuple into text. Set your own translator with
config :linea_ui, :translate_error, &MyAppWeb.CoreComponents.translate_error/1