Moving to more workable v1 solution

This commit is contained in:
Max Lynch
2021-01-09 10:52:20 -06:00
parent 6a14c1c47a
commit ba42e4d6d8
22 changed files with 288 additions and 291 deletions
-12
View File
@@ -1,12 +0,0 @@
import classNames from 'classnames';
const Content = ({ className, children, ...props }) => (
<div
{...props}
className={classNames(`h-full w-full overflow-auto py-2 absolute top-0`, className)}
>
{children}
</div>
);
export default Content;
-37
View File
@@ -1,37 +0,0 @@
import classNames from 'classnames';
import { Transition } from 'react-transition-group';
const duration = 500;
const defaultStyle = {
transition: `opacity ${duration}ms ease-in-out`,
opacity: 0,
};
const transitionStyles = {
entering: { opacity: 1 },
entered: { opacity: 1 },
exiting: { opacity: 0 },
exited: { opacity: 0 },
};
const PageStack = ({ children, className, ...props }) => (
<div {...props} className={classNames('flex-1 z-0 overflow-hidden relative', className)}>
<Transition in={true} duration={duration}>
{state => (
<div
className="w-full h-full"
style={{
...defaultStyle,
...transitionStyles[state],
}}
>
{children}
</div>
)}
</Transition>
</div>
);
export default PageStack;
+1 -1
View File
@@ -1,6 +1,6 @@
import classNames from 'classnames';
import Icon from './Icon';
import { Link } from 'wouter';
import Link from '../../components/Link';
import { useEffect, useState } from 'react';
const Tab = ({ title, href, icon, selected, selectedIcon, onClick }) => {