ISSUE-017 - Overlay state is streamlined.
Total change to workspaces. Now an object instead of a list. Utilizing workspace overlays list - prototype currently colors the mock item. Reset overlay on workspace change. Improved combined dragging/transition element behavior.
This commit is contained in:
1 parent
a6a5eb7751
commit
861d702a27
11 files changed
+177
-150
No files matched your search
@@ -1,47 +1,21 @@
|
||||
import { animated } from "@react-spring/web";
|
||||
import styled from "styled-components";
|
||||
|
||||
import { OverlayPosition } from "../../../types/state";
|
||||
|
||||
export type OverlayItemContainerProps = {
|
||||
position: OverlayPosition,
|
||||
visible: boolean,
|
||||
tempColor: string,
|
||||
};
|
||||
export const OverlayItemContainer = styled.div.attrs<OverlayItemContainerProps>(({
|
||||
position: { x, y },
|
||||
visible,
|
||||
}) => ({
|
||||
style: {
|
||||
top: y,
|
||||
left: x,
|
||||
display: visible ? undefined : "none",
|
||||
},
|
||||
}))<OverlayItemContainerProps>`
|
||||
/* Temporary. Overlay will be transparent and based on an image. */
|
||||
width: 150px;
|
||||
height: 150px;
|
||||
background-color: white;
|
||||
background-color: ${({ tempColor }) => tempColor};
|
||||
box-shadow: 0px 7px 11px 1px black;
|
||||
`;
|
||||
OverlayItemContainer.displayName = "OverlayItemContainer";
|
||||
|
||||
type AnimatedOverlayItemContainerProps = {
|
||||
visible: boolean,
|
||||
}
|
||||
export const AnimatedOverlayItemContainer = styled(animated.div).attrs<AnimatedOverlayItemContainerProps>(({
|
||||
visible,
|
||||
}) => ({
|
||||
style: {
|
||||
display: visible ? undefined : "none",
|
||||
},
|
||||
}))<AnimatedOverlayItemContainerProps>`
|
||||
position: absolute;
|
||||
z-index: 1;
|
||||
|
||||
/* Temporary. Overlay will be transparent and based on an image. */
|
||||
width: 150px;
|
||||
height: 150px;
|
||||
background-color: white;
|
||||
box-shadow: 0px 7px 11px 1px black;
|
||||
`;
|
||||
|
||||
Reference in new issue
Block a user