List items and modal

This commit is contained in:
Max Lynch
2020-12-22 12:37:43 -06:00
parent 49c497670a
commit 9a37a9f7db
80 changed files with 231 additions and 47 deletions
+3 -7
View File
@@ -4,7 +4,7 @@ import { useEffect, useLayoutEffect, useRef, useState } from 'react';
import { useDrag } from 'react-use-gesture';
const Menu = ({ open, onClose, children }) => {
const Menu = ({ open, onClose, children, className, ...props }) => {
const ref = useRef();
const [x, setX] = useState(-100000);
const [rect, setRect] = useState(null);
@@ -68,6 +68,7 @@ const Menu = ({ open, onClose, children }) => {
return (
<div
{...props}
{...bind()}
ref={ref}
style={{
@@ -78,15 +79,10 @@ const Menu = ({ open, onClose, children }) => {
}}
className={classNames(
'fixed z-40 transform transform-gpu translate w-48 h-full bg-gray-100',
className,
{
'transition-transform': !dragging,
}
/*
{
'-translate-x-full': !open,
'-translate-x-0': open,
}
*/
)}
>
{children}