ISSUE-018 - Added pixel size indicator for overlay images.
Added new global rule for touch-action so that I don't need to keep setting it up for elements that utilize use-gesture.
This commit is contained in:
1 parent
32d92de2d5
commit
bf121aa032
4 files changed
+37
-6
No files matched your search
@@ -14,6 +14,7 @@ export const OverlayImage = styled.img.attrs<OverlayImageProps>(({
|
||||
src,
|
||||
}))<OverlayImageProps>`
|
||||
width: ${({ scale = 100 }) => `${scale}%`};
|
||||
|
||||
&:active {
|
||||
outline: 2px solid red;
|
||||
outline-offset: -2px;
|
||||
@@ -32,6 +33,13 @@ export const OverlayImageContainer = styled.div.attrs<OverlayImageContainerProps
|
||||
},
|
||||
}))<OverlayImageContainerProps>`
|
||||
display: flex;
|
||||
|
||||
&:hover {
|
||||
> span {
|
||||
display: inline;
|
||||
}
|
||||
}
|
||||
|
||||
`;
|
||||
OverlayImageContainer.displayName = "OverlayImageContainer";
|
||||
|
||||
@@ -39,3 +47,18 @@ export const OverlayImageSubContainer = styled.div`
|
||||
flex-shrink: 0;
|
||||
`;
|
||||
OverlayImageSubContainer.displayName = "OverlayImageSubContainer";
|
||||
|
||||
export const OverlayImageSize = styled.span`
|
||||
position: absolute;
|
||||
display: none;
|
||||
|
||||
left: 0;
|
||||
bottom: -1.5em;
|
||||
width: 15ch;
|
||||
|
||||
color: red;
|
||||
font-family: ${p => p.theme.fonts.f1Regular};
|
||||
font-size: 1em;
|
||||
text-shadow: -1px -1px 1px rgba(255,255,255,.1), 1px 1px 1px rgba(0,0,0,.5);
|
||||
`;
|
||||
OverlayImageSize.displayName = "OverlayImageSize";
|
||||
Reference in new issue
Block a user