🐛 Fix Hover in ModuleWrapper

This commit is contained in:
ajnart
2022-08-01 17:53:32 +02:00
parent 0e1419cc9a
commit af001d8dfa

View File

@@ -181,6 +181,9 @@ export function ModuleWrapper(props: any) {
export function ModuleMenu(props: any) { export function ModuleMenu(props: any) {
const { module, styles, hovered } = props; const { module, styles, hovered } = props;
const items: JSX.Element[] = getItems(module); const items: JSX.Element[] = getItems(module);
if (!hovered) {
return null;
}
return ( return (
<> <>
{module.options && ( {module.options && (
@@ -207,12 +210,7 @@ export function ModuleMenu(props: any) {
right: 12, right: 12,
}} }}
> >
<motion.div <motion.div initial={{ opacity: 0 }} animate={{ opacity: 1 }}>
animate={{
//TODO: fix the hover problem
opacity: hovered ? 1 : 1,
}}
>
<ActionIcon> <ActionIcon>
<IconAdjustments /> <IconAdjustments />
</ActionIcon> </ActionIcon>