From bf8178cce53b9218b1a29e4639d8fb07af0d9ef3 Mon Sep 17 00:00:00 2001 From: Paul Miller Date: Wed, 26 Apr 2023 17:08:08 -0500 Subject: [PATCH] fix tailwind --- src/components/layout/Radio.tsx | 1 + tailwind.config.cjs | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/src/components/layout/Radio.tsx b/src/components/layout/Radio.tsx index af44725..efa7eb8 100644 --- a/src/components/layout/Radio.tsx +++ b/src/components/layout/Radio.tsx @@ -6,6 +6,7 @@ type Choices = { value: string, label: string, caption: string }[] // TODO: how could would it be if we could just pass the estimated fees in here? export function StyledRadioGroup(props: { value: string, choices: Choices, onValueChange: (value: string) => void, small?: boolean, }) { return ( + // TODO: rewrite this with CVA, props are bad for tailwind props.onValueChange(e)} class={`grid w-full gap-${props.small ? "2" : "4"} grid-cols-${props.choices.length.toString()}`}> {choice => diff --git a/tailwind.config.cjs b/tailwind.config.cjs index 9cd610e..7b03d9e 100644 --- a/tailwind.config.cjs +++ b/tailwind.config.cjs @@ -6,6 +6,12 @@ module.exports = { "./index.html", "./src/**/*.{js,ts,jsx,tsx}", ], + safelist: [ + 'grid-cols-1', + 'grid-cols-2', + 'gap-2', + 'gap-4' + ], variants: { extend: { borderWidth: ['responsive', 'last', 'hover', 'focus'],