mirror of
https://github.com/Vikeo/LifeTrinket.git
synced 2025-11-15 15:27:59 +00:00
fix button position
This commit is contained in:
@@ -12,7 +12,9 @@ export const StyledLifeCounterButton = styled.button`
|
|||||||
border: none;
|
border: none;
|
||||||
outline: none;
|
outline: none;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
padding: 0 28px;
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
user-select: none;
|
user-select: none;
|
||||||
-webkit-touch-callout: none;
|
-webkit-touch-callout: none;
|
||||||
-webkit-tap-highlight-color: transparent;
|
-webkit-tap-highlight-color: transparent;
|
||||||
@@ -29,19 +31,33 @@ const TextContainer = styled.div<{
|
|||||||
align?: string;
|
align?: string;
|
||||||
rotation: number;
|
rotation: number;
|
||||||
}>`
|
}>`
|
||||||
text-align: ${(props) => props.align || 'center'};
|
position: relative;
|
||||||
|
|
||||||
${(props) => {
|
${(props) => {
|
||||||
if (
|
if (
|
||||||
props.rotation === Rotation.SideFlipped ||
|
props.rotation === Rotation.SideFlipped ||
|
||||||
props.rotation === Rotation.Side
|
props.rotation === Rotation.Side
|
||||||
) {
|
) {
|
||||||
|
if (props.align === 'right') {
|
||||||
return css`
|
return css`
|
||||||
rotate: -90deg;
|
rotate: -90deg;
|
||||||
width: auto;
|
bottom: 25%;
|
||||||
padding: 28px 0;
|
|
||||||
justify-content: space-between;
|
|
||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
|
return css`
|
||||||
|
rotate: -90deg;
|
||||||
|
top: 25%;
|
||||||
|
`;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (props.align === 'right') {
|
||||||
|
return css`
|
||||||
|
left: 25%;
|
||||||
|
`;
|
||||||
|
}
|
||||||
|
return css`
|
||||||
|
right: 25%;
|
||||||
|
`;
|
||||||
}}
|
}}
|
||||||
`;
|
`;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user