mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-25 12:56:41 +07:00
comments mock
This commit is contained in:
parent
bdf7ba1ccb
commit
2a6604afaf
18 changed files with 340 additions and 12 deletions
29
src/components/containers/Padder/index.tsx
Normal file
29
src/components/containers/Padder/index.tsx
Normal file
|
@ -0,0 +1,29 @@
|
|||
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 };
|
13
src/components/containers/Padder/styles.scss
Normal file
13
src/components/containers/Padder/styles.scss
Normal file
|
@ -0,0 +1,13 @@
|
|||
.padder {
|
||||
padding: $gap;
|
||||
|
||||
&:global(.horizontal) {
|
||||
padding-top: 0;
|
||||
padding-bottom: 0;
|
||||
}
|
||||
|
||||
&:global(.vertical) {
|
||||
padding-left: 0;
|
||||
padding-right: 0;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue