This commit is contained in:
2020-06-24 18:56:24 +03:00
parent 9447ee613b
commit 5d4972145b
119 changed files with 5412 additions and 5086 deletions
+29
View File
@@ -0,0 +1,29 @@
import React, {HTMLAttributes} from "react";
import classNames from "../../classNames";
import './Group.sass'
interface Props extends HTMLAttributes<HTMLElement> {
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 (
<div className={classNames('Group', className)} {...props}>
<div className="Group__Title">{title}</div>
<div style={style}>
{children}
</div>
</div>
)
}
export default Group;