mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-26 05:16:41 +07:00
refactor editos
This commit is contained in:
parent
03ddb1862c
commit
5e9c111e0f
149 changed files with 416 additions and 317 deletions
22
src/components/common/CellGrid/index.tsx
Normal file
22
src/components/common/CellGrid/index.tsx
Normal file
|
@ -0,0 +1,22 @@
|
|||
import React, { 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 };
|
8
src/components/common/CellGrid/styles.module.scss
Normal file
8
src/components/common/CellGrid/styles.module.scss
Normal file
|
@ -0,0 +1,8 @@
|
|||
@import "src/styles/variables";
|
||||
|
||||
.grid {
|
||||
display: grid;
|
||||
grid-auto-rows: 1fr;
|
||||
grid-column-gap: $gap;
|
||||
grid-row-gap: $gap;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue