Moving to more workable v1 solution
This commit is contained in:
@@ -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;
|
||||
@@ -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,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 }) => {
|
||||
|
||||
Reference in New Issue
Block a user