PhoenixKitEcommerce. Web. Components. SettingRows
(PhoenixKitEcommerce v0.5.0)
Copy Markdown
View Source
Rows for the admin settings cards: a title and its explanation on the left, the control on the right.
Mirrors the row layout core uses on its own settings pages (Languages,
Crawlers): a plain flex row, font-medium title, muted explanation. The
daisyUI 5 label / fieldset-legend classes are deliberately not used
here — label is an inline-flex, muted text style meant for a single
input caption, and fieldset-legend styles a <legend>; stacking them
around a paragraph of explanation greys the whole row out and stops the
control from reaching the right edge.
Summary
Functions
A setting whose control is not a toggle — a link, a button group, a small form — passed as the inner block.
A setting with an on/off toggle. The whole row is the label, so clicking the text flips the toggle too.
Functions
A setting whose control is not a toggle — a link, a button group, a small form — passed as the inner block.
Attributes
id(:string) - Defaults tonil.title(:string) (required)description(:string) - Defaults tonil.note(:string) - Defaults tonil.class(:string) - Defaults tonil.
Slots
inner_block(required) - The control(s), rendered on the right.
A setting with an on/off toggle. The whole row is the label, so clicking the text flips the toggle too.
event is pushed on click; use rest for phx-value-* attributes.
Attributes
id(:string) - DOM id of the checkbox (tests target it). Defaults tonil.title(:string) (required)description(:string) - Defaults tonil.note(:string) - Smaller third line, e.g. a caveat. Defaults tonil.checked(:boolean) (required)event(:string) (required)toggle_class(:string) - daisyUI toggle colour class. Defaults to"toggle-primary".class(:string) - Extra classes on the row. Defaults tonil.- Global attributes are accepted.