Option function

Component Option({
  1. String? className,
  2. String? style,
  3. String? id,
  4. String? label,
  5. String? value,
  6. bool selected = false,
  7. bool disabled = false,
  8. Component? child,
  9. List<Component>? children,
  10. Map<String, String>? attributes,
  11. Map<String, EventCallback>? events,
  12. Key? key,
})

An option element.

The HTML <option> element is used to define an item in a select, optgroup, or datalist.

Implementation

Component Option({
  String? className,
  String? style,
  String? id,
  String? label,
  String? value,
  bool selected = false,
  bool disabled = false,
  Component? child,
  List<Component>? children,
  Map<String, String>? attributes,
  Map<String, EventCallback>? events,
  Key? key,
}) {
  return jaspr.option(
    resolveChildren(child, children),
    classes: className,
    styles: parseStyles(style),
    id: id,
    label: label,
    value: value,
    selected: selected,
    disabled: disabled,
    attributes: attributes,
    events: events,
    key: key,
  );
}