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
2019-08-09 12:23:07 +07:00

30 lines
574 B
TypeScript

import React, { FC } from 'react';
import * as styles from './styles.scss';
import classNames = require('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 };