1
0
Fork 0
mirror of https://github.com/muerwre/vault-frontend.git synced 2025-04-24 20:36:40 +07:00
vault-frontend/src/components/containers/Padder/index.tsx
2022-01-02 20:59:52 +07:00

30 lines
571 B
TypeScript

import React, { FC } from 'react';
import styles from './styles.module.scss';
import classNames from 'classnames';
type IProps = React.HTMLAttributes<HTMLDivElement> & {
padding?: number;
vertical?: boolean;
horizontal?: boolean;
};
const Padder: FC<IProps> = ({
padding,
children,
className,
style = {},
vertical,
horizontal,
...props
}) => (
<div
className={classNames(styles.padder, className, { vertical, horizontal })}
style={padding ? { ...style, padding } : style}
{...props}
>
{children}
</div>
);
export { Padder };