import React, { FunctionComponent } from 'react' import styled from '@emotion/styled' import useMangoStore from '../stores/useMangoStore' import { MoveIcon } from './icons' const StyledDragWrapperContent = styled.div` transition: all 0.25s ease-in; opacity: 0; ` const StyledDragBkg = styled.div` transition: all 0.25s ease-in; opacity: 0; ` const StyledDragWrapper = styled.div` :hover { ${StyledDragWrapperContent} { opacity: 1; } ${StyledDragBkg} { opacity: 0.9; } } ` interface FloatingElementProps { className?: string } const FloatingElement: FunctionComponent = ({ className, children, }) => { const { uiLocked } = useMangoStore((s) => s.settings) return (
{!uiLocked ? (
Drag to reposition
) : null} {children}
) } export default FloatingElement