mirror of
https://github.com/mue/mue.git
synced 2026-07-26 02:01:19 +02:00
style(tooltip): New tooltip animation
This commit is contained in:
@@ -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 };
|
||||
|
||||
Reference in New Issue
Block a user