From 0146b28e72d05dc577dae6cfaee50972e15e2667 Mon Sep 17 00:00:00 2001 From: Belar Date: Fri, 22 Nov 2024 13:23:53 +0000 Subject: [PATCH] fix: controls bar to only have valid classes --- src/ControlsBar.tsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/ControlsBar.tsx b/src/ControlsBar.tsx index 0edc9f9..103d06a 100644 --- a/src/ControlsBar.tsx +++ b/src/ControlsBar.tsx @@ -12,7 +12,13 @@ export default function ControlsBar({ stickTo, growFirstItem, }: ControlsBar) { - const className = `controls-bar ${stickTo && `sticky ${stickTo}`} ${growFirstItem ? "grow-first" : ""}`; + const className = [ + "controls-bar", + (stickTo && `sticky ${stickTo}`) || "", + (growFirstItem && "grow-first") || "", + ] + .filter(Boolean) + .join(" "); return
{children}
; }