import React, {Children, cloneElement, isValidElement} from "react"; import { Typography } from "../.."; import TypographyProps from "../../typography/Typography/Typography.types"; import PanelProps from "./Panel.types"; export const Panel = ({ id, name, classes, children, ...attributes }: PanelProps) => { if (!id && name) { id = name; } else if (!name && id) { name = id; } const arrayChildren: any = Children.toArray(children); const headerVariants = ['xl', 'l', 'm', 's']; return (