more styling

This commit is contained in:
Viktor Rådberg
2023-08-04 14:14:40 +02:00
parent 2eebdc130c
commit 5d35a323e0
2 changed files with 30 additions and 31 deletions

View File

@@ -81,12 +81,8 @@ const LifeCountainer = styled.div<{
const LifeCounterTextContainer = styled.p<{ const LifeCounterTextContainer = styled.p<{
rotation: Rotation; rotation: Rotation;
}>` }>`
/* top: 50%;
left: 50%;
translate: -50% -50%;
margin: 0; margin: 0;
padding: 0; */ padding: 0;
pointer-events: none; pointer-events: none;
-webkit-touch-callout: none; -webkit-touch-callout: none;
-webkit-tap-highlight-color: transparent; -webkit-tap-highlight-color: transparent;
@@ -101,6 +97,7 @@ const LifeCounterTextContainer = styled.p<{
) { ) {
return css` return css`
rotate: 270deg; rotate: 270deg;
margin-right: 25%;
`; `;
} }
}} }}
@@ -168,9 +165,9 @@ const LifeCounter = ({
return () => clearTimeout(timer); return () => clearTimeout(timer);
}, [recentDifference]); }, [recentDifference]);
const size = 20; const size = 30;
const fontSize = `${size}vmax`; const fontSize = `${size}vmin`;
const strokeWidth = `${size / 20}vmax`; const strokeWidth = `${size / 20}vmin`;
return ( return (
<LifeCounterContentWrapper backgroundColor={backgroundColor}> <LifeCounterContentWrapper backgroundColor={backgroundColor}>

View File

@@ -174,6 +174,7 @@ const Settings = ({ player, onChange, resetCurrentGame }: SettingsProps) => {
onChange={handleColorChange} onChange={handleColorChange}
/> />
<SettingsSection rotation={player.settings.rotation}> <SettingsSection rotation={player.settings.rotation}>
{player.settings.useCommanderDamage && (
<CheckboxContainer rotation={player.settings.rotation}> <CheckboxContainer rotation={player.settings.rotation}>
<Checkbox <Checkbox
name="usePartner" name="usePartner"
@@ -197,6 +198,7 @@ const Settings = ({ player, onChange, resetCurrentGame }: SettingsProps) => {
onChange={handleSettingsChange} onChange={handleSettingsChange}
/> />
</CheckboxContainer> </CheckboxContainer>
)}
<CheckboxContainer rotation={player.settings.rotation}> <CheckboxContainer rotation={player.settings.rotation}>
<Checkbox <Checkbox