mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-24 20:36:40 +07:00
refactor editos
This commit is contained in:
parent
03ddb1862c
commit
5e9c111e0f
149 changed files with 416 additions and 317 deletions
44
src/components/common/Group/index.tsx
Normal file
44
src/components/common/Group/index.tsx
Normal file
|
@ -0,0 +1,44 @@
|
|||
import React, { FC } from 'react';
|
||||
|
||||
import classNames from 'classnames';
|
||||
|
||||
import styles from './styles.module.scss';
|
||||
|
||||
type IProps = React.HTMLAttributes<HTMLDivElement> & {
|
||||
horizontal?: boolean;
|
||||
top?: boolean;
|
||||
bottom?: boolean;
|
||||
wrap?: boolean;
|
||||
seamless?: boolean;
|
||||
};
|
||||
|
||||
const Group: FC<IProps> = ({
|
||||
children,
|
||||
className = '',
|
||||
horizontal = false,
|
||||
top = false,
|
||||
bottom = false,
|
||||
wrap = false,
|
||||
seamless = false,
|
||||
...props
|
||||
}) => (
|
||||
<div
|
||||
className={classNames(
|
||||
styles.group,
|
||||
{
|
||||
[styles.horizontal]: horizontal,
|
||||
[styles.vertical]: !horizontal,
|
||||
[styles.top]: top,
|
||||
[styles.bottom]: bottom,
|
||||
[styles.wrap]: wrap,
|
||||
[styles.seamless]: seamless,
|
||||
},
|
||||
className
|
||||
)}
|
||||
{...props}
|
||||
>
|
||||
{children}
|
||||
</div>
|
||||
);
|
||||
|
||||
export { Group };
|
Loading…
Add table
Add a link
Reference in a new issue