Panel constructor

Panel({
  1. String? title,
  2. String? description,
  3. Object? actions,
  4. Object? child,
  5. List<Object?> children = const [],
  6. String? className,
  7. Map<String, Object?> props = const {},
  8. Map<String, Object?> style = const {},
  9. DartStyle? dartStyle,
})

Creates a panel around child content.

Implementation

Panel({
  String? title,
  String? description,
  Object? actions,
  Object? child,
  List<Object?> children = const [],
  String? className,
  Map<String, Object?> props = const {},
  Map<String, Object?> style = const {},
  DartStyle? dartStyle,
}) : super(
       'section',
       props: mergeComponentProps(
         props,
         className: className,
         defaultStyle: const {
           'display': 'grid',
           'gap': '14px',
           'border': '1px solid #e4e7ec',
           'border-radius': '8px',
           'padding': '16px',
           'background': '#ffffff',
         },
         dartStyle: dartStyle,
         style: style,
       ),
       children: [
         if (title != null || description != null || actions != null)
           Section(title: title, description: description, actions: actions),
         ...normalizeChildren(child, children),
       ],
     );