div

DivElement div({

  1. Map<String, dynamic>? props,
  2. Map<String, dynamic>? style,
  3. List<ReactElement>? children,
  4. String? className,
  5. ReactElement? child,
})

Create a div element

Implementation

DivElement div({
  Map<String, dynamic>? props,
  Map<String, dynamic>? style,
  List<ReactElement>? children,
  String? className,
  ReactElement? child,
}) {
  final p = _buildProps(props: props, style: style, className: className);
  final jsObj = (children != null && children.isNotEmpty)
      ? createElementWithChildren('div'.toJS, _propsOrNull(p), children)
      : (child != null)
          ? createElement('div'.toJS, _propsOrNull(p), child)
          : createElement('div'.toJS, _propsOrNull(p));
  return DivElement.fromJS(jsObj);
}