mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-25 12:56:41 +07:00
added notes menu
This commit is contained in:
parent
fce11163aa
commit
57f37723fa
14 changed files with 203 additions and 105 deletions
22
src/components/containers/Columns/index.tsx
Normal file
22
src/components/containers/Columns/index.tsx
Normal file
|
@ -0,0 +1,22 @@
|
|||
import React, { FC } from 'react';
|
||||
|
||||
import Masonry from 'react-masonry-css';
|
||||
|
||||
import styles from './styles.module.scss';
|
||||
|
||||
const defaultColumns = {
|
||||
default: 2,
|
||||
1280: 1,
|
||||
};
|
||||
|
||||
interface ColumnsProps {
|
||||
cols?: Record<number, number>;
|
||||
}
|
||||
|
||||
const Columns: FC<ColumnsProps> = ({ children, cols = defaultColumns }) => (
|
||||
<Masonry className={styles.wrap} breakpointCols={cols} columnClassName={styles.column}>
|
||||
{children}
|
||||
</Masonry>
|
||||
);
|
||||
|
||||
export { Columns };
|
27
src/components/containers/Columns/styles.module.scss
Normal file
27
src/components/containers/Columns/styles.module.scss
Normal file
|
@ -0,0 +1,27 @@
|
|||
@import "src/styles/variables";
|
||||
@import "src/styles/mixins";
|
||||
|
||||
div.wrap {
|
||||
display: flex;
|
||||
width: 100%;
|
||||
margin-right: 0;
|
||||
padding: $gap $gap * 0.5;
|
||||
|
||||
@include tablet {
|
||||
padding: 0 $gap * 0.5;
|
||||
}
|
||||
}
|
||||
|
||||
.column {
|
||||
background-clip: padding-box;
|
||||
box-sizing: border-box;
|
||||
padding: 0 $gap * 0.5;
|
||||
|
||||
@include tablet {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
& > div {
|
||||
margin-bottom: $gap;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue