🐛 Fix ModuleWrapper Hover state

This commit is contained in:
ajnart
2022-08-02 00:20:42 +02:00
parent 09a8dd7db8
commit eff2fc5ac7

View File

@@ -181,9 +181,6 @@ 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 && (
@@ -210,7 +207,7 @@ export function ModuleMenu(props: any) {
right: 12, right: 12,
}} }}
> >
<motion.div initial={{ opacity: 0 }} animate={{ opacity: 1 }}> <motion.div initial={{ opacity: 0 }} animate={{ opacity: hovered ? 1 : 0 }}>
<ActionIcon> <ActionIcon>
<IconAdjustments /> <IconAdjustments />
</ActionIcon> </ActionIcon>