Skip to content

Commit

Permalink
fixed overlay hotkeys
Browse files Browse the repository at this point in the history
  • Loading branch information
maxibenner committed Aug 6, 2021
1 parent 4be84bb commit 09427d5
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 10 deletions.
24 changes: 14 additions & 10 deletions src/components/overlay/Overlay.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,20 @@ import useStore from "../../states/modelState"
import s from "./overlay.module.css"

const Overlay = () => {
const { decalPath } = useStore()
const { decalPath, animation } = useStore()
return (
<div className={s.wrapper}>
<Card bg narrow>
<IconWithText
imgSrc={keyR}
imgAlt="rotate"
textContent="Rotate"
/>
{decalPath && (
{!animation && (
<div className={s.inner}>
<IconWithText
imgSrc={keyR}
imgAlt="rotate"
textContent="Rotate"
/>
</div>
)}
{decalPath && (
<div className={s.inner}>
<>
<IconWithText
imgSrc={keyUp}
Expand All @@ -36,8 +40,8 @@ const Overlay = () => {
textContent="Cancel"
/>
</>
)}
</Card>
</div>
)}
</div>
)
}
Expand Down
7 changes: 7 additions & 0 deletions src/components/overlay/overlay.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,11 @@
bottom: 0;
z-index: 10;
width: 200px;
margin: 15px 0;
}
.inner {
margin: 5px 15px 0 15px;
padding: 5px 7px;
background: white;
border-radius: 5px;
}

0 comments on commit 09427d5

Please sign in to comment.