From 69edb10b0446bf52a7335fb122a56c98436cba2c Mon Sep 17 00:00:00 2001 From: maxime Date: Mon, 18 Mar 2024 22:44:07 +0100 Subject: [PATCH] fix player with or without ball to the same size --- src/components/editor/PlayerPiece.tsx | 4 +++- src/style/player.css | 4 ++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/components/editor/PlayerPiece.tsx b/src/components/editor/PlayerPiece.tsx index 1b52ff8..1a7067b 100644 --- a/src/components/editor/PlayerPiece.tsx +++ b/src/components/editor/PlayerPiece.tsx @@ -10,7 +10,9 @@ export interface PlayerPieceProps { export function PlayerPiece({ team, text, hasBall }: PlayerPieceProps) { let className = `player-piece ${team}` if (hasBall) { - className += ` player-piece-has-ball` + className += " player-piece-has-ball" + } else { + className += " player-piece-has-no-ball" } return ( diff --git a/src/style/player.css b/src/style/player.css index 80dd4e5..4e2e368 100644 --- a/src/style/player.css +++ b/src/style/player.css @@ -45,6 +45,10 @@ border-color: var(--player-piece-ball-border-color); } +.player-piece-has-no-ball { + padding: 2px +} + .player-actions { display: flex;