style(tooltip): New tooltip animation

This commit is contained in:
alexsparkes
2024-06-09 18:12:48 +01:00
parent 20b5c0b593
commit 55e9e74294
3 changed files with 48 additions and 77 deletions

View File

@@ -1,3 +1,21 @@
const Panel = ({ children, type }) => <section className={type}>{children}</section>;
import { motion, AnimatePresence } from 'framer-motion';
const Panel = ({ children, type }) => {
let className;
switch (type) {
case 'aside':
className = 'aside';
break;
case 'content':
return (
<section className="content">
{children}
</section>
);
default:
className = type;
}
return <section className={className}>{children}</section>;
};
export { Panel as default, Panel };