View Source Moon.Design.Dropdown.Option (Moon v2.87.4)
Single oprion for the dropdown component. Renders as a button
Properties
- testid :string - Data-testid attribute for button
- id :string - Id attribute for buttons
- title :string - Title to be shown when no default slot is given
- class :css_class - Additional CSS classes for the button tag
- disabled :boolean - If the button is disabled
- value :any, from_context: :value - Value of the option, in most cases got from context
- is_selected :boolean, from_context: :is_selected - If the option is selected, in most cases got from context
- size :string, values!: ~w(sm md lg), from_context: :size - Text size & paddings for the option. Is set by Dropdown.Options in most cases
- values :map, from_context: :values - Additional values to be passed
Slots
- default - Inner content of the option
Events
- on_click, from_context: :on_click - On click event, in most cases got from context
Summary
Functions
Callback implementation for Surface.Component.render/1
.
Functions
Callback implementation for Surface.Component.render/1
.