import React, {HTMLAttributes} from "react"; import classNames from "../../classNames"; import './Group.sass' interface Props extends HTMLAttributes { title: string direction?: 'column' | 'row' } const Group = (restProps: Props) => { const { title, direction, className, children, ...props } = restProps; let style: React.CSSProperties = {}; if(direction === 'column') { style = { display: 'flex', flexDirection: 'column' } } return (
{title}
{children}
) } export default Group;