$option

El $option({

  1. required String value,
  2. String? key,
  3. bool? disabled,
  4. bool? selected,
  5. Map<String, dynamic>? spread,
})

Creates an <option> element wrapper for JSX-style composition.

Implementation

El $option({
  required String value,
  String? key,
  bool? disabled,
  bool? selected,
  Map<String, dynamic>? spread,
}) {
  final p = <String, dynamic>{'value': value};
  if (key != null) p['key'] = key;
  if (disabled != null) p['disabled'] = disabled;
  if (selected != null) p['selected'] = selected;
  if (spread != null) p.addAll(spread);
  return El(_createJsxElement('option', p));
}