1
0
Fork 0
mirror of https://github.com/muerwre/vault-frontend.git synced 2025-04-25 04:46:40 +07:00

side pane

This commit is contained in:
muerwre 2019-06-04 04:06:11 +07:00
parent 62e72d166f
commit 9b93012b08
9 changed files with 95 additions and 5 deletions

View file

@ -0,0 +1,38 @@
import React, { useEffect, useState } from 'react';
import * as styles from './styles.scss';
import classNames from 'classnames';
export const SidePane = ({ }) => {
const [left, setLeft] = useState(0);
const moveThis = () => {
const shift = ((document.body.getBoundingClientRect().width - 1024) / 2) - 54 - 10;
setLeft(shift);
};
useEffect(() => {
window.addEventListener('resize', moveThis)
return () => { window.removeEventListener('resize', moveThis); }
});
useEffect(moveThis, []);
return (
<div className={styles.pane} style={{ left }}>
<div className={classNames(styles.group, 'logo')} />
<div className={styles.group}>
<div className={styles.btn} />
<div className={styles.btn} />
<div className={styles.btn} />
<div className={styles.btn} />
</div>
<div className={styles.flexy} />
<div className={styles.group}>
<div className={styles.btn} />
</div>
</div>
);
};