diff --git a/ui/src/ui/components/tailwind/TailwindSupport.scala b/ui/src/ui/components/tailwind/TailwindSupport.scala new file mode 100644 index 0000000..2c7d850 --- /dev/null +++ b/ui/src/ui/components/tailwind/TailwindSupport.scala @@ -0,0 +1,35 @@ +package ui.components.tailwind + +trait TailwindSupport: + // Make sure certain classes are included in the Tailwind JIT compiler + // The sizes and colors that we generate dynamically are missed + // So until I figure out how to use macros to mitigate, this should do + val extraUserClasses: List[String] = + List( + "h-2", + "h-3", + "h-4", + "h-5", + "h-6", + "h-8", + "h-10", + "h-12", + "h-14", + "h-16", + "w-2", + "w-3", + "w-4", + "w-5", + "w-6", + "w-8", + "w-10", + "w-12", + "w-14", + "w-16", + "text-red-800", + "text-amber-800", + "text-green-800", + "bg-red-100", + "bg-amber-100", + "bg-green-100" + ) diff --git a/ui/src/ui/components/tailwind/TailwindSupport.scala b/ui/src/ui/components/tailwind/TailwindSupport.scala new file mode 100644 index 0000000..2c7d850 --- /dev/null +++ b/ui/src/ui/components/tailwind/TailwindSupport.scala @@ -0,0 +1,35 @@ +package ui.components.tailwind + +trait TailwindSupport: + // Make sure certain classes are included in the Tailwind JIT compiler + // The sizes and colors that we generate dynamically are missed + // So until I figure out how to use macros to mitigate, this should do + val extraUserClasses: List[String] = + List( + "h-2", + "h-3", + "h-4", + "h-5", + "h-6", + "h-8", + "h-10", + "h-12", + "h-14", + "h-16", + "w-2", + "w-3", + "w-4", + "w-5", + "w-6", + "w-8", + "w-10", + "w-12", + "w-14", + "w-16", + "text-red-800", + "text-amber-800", + "text-green-800", + "bg-red-100", + "bg-amber-100", + "bg-green-100" + ) diff --git a/ui/src/ui/components/tailwind/list/RowTag.scala b/ui/src/ui/components/tailwind/list/RowTag.scala index 8599be5..4ad12f4 100644 --- a/ui/src/ui/components/tailwind/list/RowTag.scala +++ b/ui/src/ui/components/tailwind/list/RowTag.scala @@ -11,6 +11,12 @@ p( cls := "px-2 inline-flex text-xs leading-5 font-semibold rounded-full", - cls(colorClass(color)), + // cls(colorClass(color)), + cls := (color match { + case Color.red => "text-red-800 bg-red-100" + case Color.amber => "text-amber-800 bg-amber-100" + case Color.green => "text-green-800 bg-green-100" + case _ => "text-gray-800 bg-gray-100" + }), text )