button

ButtonElement button({

  1. required String text,
  2. void onClick()?,
  3. Map<String, dynamic>? props,
  4. Map<String, dynamic>? style,
  5. String? className,
})

Create a button element

Implementation

ButtonElement button({
  required String text,
  void Function()? onClick,
  Map<String, dynamic>? props,
  Map<String, dynamic>? style,
  String? className,
}) {
  final p = _buildProps(props: props, style: style, className: className);
  if (onClick != null) p['onClick'] = onClick;
  return ButtonElement.fromJS(
    createElement('button'.toJS, createProps(p), text.toJS),
  );
}