UNPKG

glass-app-manager

Version:

Informatica's Glass Framework CLI for bootstrapping

40 lines (36 loc) 952 B
// @flow import * as React from "react"; import classNames from "classnames"; import Section, { type SectionProps } from "./Section"; type PanelProps = { ...SectionProps, title?: string, children: React.Node, // needed to suppress flow error }; export default function Panel({ children, collapsible, initialCollapsed, maxHeight, toolbar, title, className, ...rest }: PanelProps) { return ( <div className={classNames("panel", className)} {...rest}> {title ? ( <Section collapsible={collapsible} children={children} initialCollapsed={initialCollapsed} title={title} toolbar={toolbar} maxHeight={maxHeight} /> ) : ( children )} </div> ); }