mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-24 20:36:40 +07:00
22 lines
495 B
TypeScript
22 lines
495 B
TypeScript
import { FC, HTMLAttributes } from 'react';
|
|
|
|
import classNames from 'classnames';
|
|
|
|
import styles from './styles.module.scss';
|
|
|
|
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 };
|