From 79b41e45ff294de99d5533c5a5ac0ca2337ca0a8 Mon Sep 17 00:00:00 2001 From: p-sw Date: Wed, 24 Jul 2024 23:44:45 +0900 Subject: [PATCH] fix(react/Input): apply full variant on InputFrame --- packages/react/components/Input.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/react/components/Input.tsx b/packages/react/components/Input.tsx index 96413fc..c02a340 100644 --- a/packages/react/components/Input.tsx +++ b/packages/react/components/Input.tsx @@ -24,15 +24,15 @@ const inputColors = { }; const [inputVariant, resolveInputVariantProps] = vcn({ - base: `rounded-md p-2 border ring-1 outline-none transition-all duration-200 [appearance:textfield] disabled:brightness-50 disabled:saturate-0 disabled:cursor-not-allowed ${inputColors.background.default} ${inputColors.background.hover} ${inputColors.border.default} ${inputColors.ring.default} ${inputColors.background.invalid} ${inputColors.background.invalidHover} ${inputColors.border.invalid} ${inputColors.ring.invalid} [&:has(input)]:flex [&:has(input)]:w-fit`, + base: `rounded-md p-2 border ring-1 outline-none transition-all duration-200 [appearance:textfield] disabled:brightness-50 disabled:saturate-0 disabled:cursor-not-allowed ${inputColors.background.default} ${inputColors.background.hover} ${inputColors.border.default} ${inputColors.ring.default} ${inputColors.background.invalid} ${inputColors.background.invalidHover} ${inputColors.border.invalid} ${inputColors.ring.invalid} [&:has(input)]:flex`, variants: { unstyled: { true: "bg-transparent border-none p-0 ring-0 hover:bg-transparent invalid:hover:bg-transparent invalid:focus-within:bg-transparent invalid:focus-within:ring-0", false: "", }, full: { - true: "w-full", - false: "w-fit", + true: "[&:has(input)]:w-full w-full", + false: "[&:has(input)]:w-fit w-fit", }, }, defaults: {