From 195d957251b48a8da64ada7568f99af2e5dc39be Mon Sep 17 00:00:00 2001 From: Andre H Date: Wed, 21 Feb 2024 17:08:33 +0700 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A7=20chore:=20restructure=20tailwind?= =?UTF-8?q?=20classnames?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/shared/Input/Input.theme.ts | 32 ++++++++++++++----- 1 file changed, 24 insertions(+), 8 deletions(-) diff --git a/packages/frontend/src/components/shared/Input/Input.theme.ts b/packages/frontend/src/components/shared/Input/Input.theme.ts index e0ea2c5f..65dbdfb6 100644 --- a/packages/frontend/src/components/shared/Input/Input.theme.ts +++ b/packages/frontend/src/components/shared/Input/Input.theme.ts @@ -4,26 +4,40 @@ export const inputTheme = tv( { slots: { container: [ - 'flex items-center rounded-lg relative', + 'flex', + 'items-center', + 'rounded-lg', + 'relative', 'placeholder:text-elements-disabled', - 'disabled:cursor-not-allowed disabled:bg-controls-disabled', + 'disabled:cursor-not-allowed', + 'disabled:bg-controls-disabled', ], label: ['text-sm', 'text-elements-high-em'], description: ['text-xs', 'text-elements-low-em'], input: [ 'focus-ring', - 'block w-full h-full rounded-lg text-elements-mid-em', + 'block', + 'w-full', + 'h-full', + 'rounded-lg', + 'text-elements-mid-em', 'shadow-sm', - 'border border-border-interactive', + 'border', + 'border-border-interactive', 'disabled:shadow-none', 'disabled:border-none', ], icon: ['text-elements-mid-em'], iconContainer: [ - 'absolute inset-y-0 flex items-center z-10 cursor-pointer', + 'absolute', + 'inset-y-0', + 'flex', + 'items-center', + 'z-10', + 'cursor-pointer', ], helperIcon: [], - helperText: ['flex gap-2 items-center text-elements-danger'], + helperText: ['flex', 'gap-2', 'items-center', 'text-elements-danger'], }, variants: { state: { @@ -32,10 +46,12 @@ export const inputTheme = tv( }, error: { input: [ - 'outline outline-offset-0 outline-border-danger', + 'outline', + 'outline-offset-0', + 'outline-border-danger', 'shadow-none', ], - helperText: ['text-elements-danger'], + helperText: 'text-elements-danger', }, }, size: {