$iframe

ReactElement $iframe({

  1. required String src,
  2. String? className,
  3. String? id,
  4. int? width,
  5. int? height,
  6. String? title,
  7. String? sandbox,
  8. String? allow,
  9. Map<String, dynamic>? style,
  10. Map<String, dynamic>? props,
})

Creates an <iframe> element (self-closing unless children needed).

Implementation

ReactElement $iframe({
  required String src,
  String? className,
  String? id,
  int? width,
  int? height,
  String? title,
  String? sandbox,
  String? allow,
  Map<String, dynamic>? style,
  Map<String, dynamic>? props,
}) {
  final p = _buildJsxProps(
    className: className,
    id: id,
    style: style,
    props: props,
  );
  p['src'] = src;
  if (width != null) p['width'] = width;
  if (height != null) p['height'] = height;
  if (title != null) p['title'] = title;
  if (sandbox != null) p['sandbox'] = sandbox;
  if (allow != null) p['allow'] = allow;
  return _createJsxElement('iframe', p);
}