From 8fb3393ea5fc81b5ef685061410e58ca8a2980c5 Mon Sep 17 00:00:00 2001 From: Wout De Puysseleir Date: Tue, 30 May 2023 11:23:01 -0700 Subject: [PATCH] Fix text in active radio button field (#1943) --- lib/livebook_web/components/form_components.ex | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/livebook_web/components/form_components.ex b/lib/livebook_web/components/form_components.ex index a7242320a..8c6df177e 100644 --- a/lib/livebook_web/components/form_components.ex +++ b/lib/livebook_web/components/form_components.ex @@ -329,9 +329,11 @@ defmodule LivebookWeb.FormComponents do class={[ @full_width && "flex-grow text-center", "px-3 py-2 first:rounded-l-lg last:rounded-r-lg font-medium text-sm whitespace-nowrap cursor-pointer", - "border border-r-0 last:border-r border-gray-500 text-gray-500 hover:bg-gray-100 focus:bg-gray-100", - to_string(@value) == value && - "bg-gray-500 text-gray-50 hover:bg-gray-500 focus:bg-gray-500" + "border border-r-0 last:border-r border-gray-500", + if(to_string(@value) == value, + do: "text-gray-50 bg-gray-500", + else: "text-gray-500 hover:bg-gray-100 focus:bg-gray-100" + ) ]} >