1
0
Fork 0
mirror of https://github.com/muerwre/vault-frontend.git synced 2025-04-25 04:46:40 +07:00
vault-frontend/src/components/containers/CellGrid/index.tsx
2019-10-13 18:43:42 +07:00

21 lines
505 B
TypeScript

import React, { FC, HTMLAttributes } from 'react';
import * as styles from './styles.scss';
import classNames = require('classnames');
type IProps = HTMLAttributes<HTMLDivElement> & {
children: any;
size: number;
};
const CellGrid: FC<IProps> = ({ children, size, className, ...props }) => (
<div
className={classNames(styles.grid, className)}
style={{ gridTemplateColumns: `repeat(auto-fit, minmax(${size}px, 1fr))` }}
{...props}
>
{children}
</div>
);
export { CellGrid };