From ee9f80ae3b17ead98e6510b951beaee98a3c7c5b Mon Sep 17 00:00:00 2001 From: Aditya Raj Date: Wed, 3 May 2023 03:19:17 +0530 Subject: [PATCH] Fix form inputs height to 36px (#8541) * fix form inputs height to 36px * fix: remove h-9 from preset Signed-off-by: Udit Takkar * fix input addOns container height * replace minHeight class with height in input addOn --------- Signed-off-by: Udit Takkar Co-authored-by: Udit Takkar Co-authored-by: sean-brydon <55134778+sean-brydon@users.noreply.github.com> Co-authored-by: Keith Williams --- apps/web/components/eventtype/EventSetupTab.tsx | 2 +- packages/ui/components/form/inputs/Input.tsx | 12 ++++++------ packages/ui/components/form/select/Select.tsx | 4 ++-- .../form/toggleGroup/BooleanToggleGroup.tsx | 2 +- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/apps/web/components/eventtype/EventSetupTab.tsx b/apps/web/components/eventtype/EventSetupTab.tsx index bc2f1b1181..c985e7a4a8 100644 --- a/apps/web/components/eventtype/EventSetupTab.tsx +++ b/apps/web/components/eventtype/EventSetupTab.tsx @@ -276,7 +276,7 @@ export const EventSetupTab = ( return (
  • + className="border-default text-default mb-2 h-9 rounded-md border py-1.5 px-2 hover:cursor-pointer">
    (function Input( {...props} ref={ref} className={classNames( - "hover:border-emphasis border-default bg-default placeholder:text-muted text-emphasis disabled:hover:border-default min-h-9 disabled:bg-subtle mb-2 block rounded-md border py-2 px-3 text-sm focus:border-neutral-300 focus:outline-none focus:ring-2 focus:ring-neutral-800 focus:ring-offset-1 disabled:cursor-not-allowed", + "hover:border-emphasis border-default bg-default placeholder:text-muted text-emphasis disabled:hover:border-default min-h-9 disabled:bg-subtle mb-2 block rounded-md border py-2 px-3 text-sm leading-4 focus:border-neutral-300 focus:outline-none focus:ring-2 focus:ring-neutral-800 focus:ring-offset-1 disabled:cursor-not-allowed", isFullWidth && "w-full", props.className )} @@ -33,7 +33,7 @@ export const Input = forwardRef(function Input( export function InputLeading(props: JSX.IntrinsicElements["div"]) { return ( - + {props.children} ); @@ -68,13 +68,13 @@ type AddonProps = { const Addon = ({ isFilled, children, className, error }: AddonProps) => (
    {children} @@ -280,7 +280,7 @@ export const TextArea = forwardRef(function ref={ref} {...props} className={classNames( - "hover:border-emphasis border-default bg-default placeholder:text-muted text-emphasis disabled:hover:border-default mb-2 block w-full rounded-md border py-2 px-3 text-sm focus:border-neutral-300 focus:outline-none focus:ring-2 focus:ring-neutral-800 focus:ring-offset-1 disabled:cursor-not-allowed", + "hover:border-emphasis border-default bg-default placeholder:text-muted text-emphasis disabled:hover:border-default mb-2 block w-full rounded-md border py-2 px-3 text-sm leading-4 focus:border-neutral-300 focus:outline-none focus:ring-2 focus:ring-neutral-800 focus:ring-offset-1 disabled:cursor-not-allowed", props.className )} /> @@ -367,7 +367,7 @@ export const Form = forwardRef(PlainForm) as ( export function FieldsetLegend(props: JSX.IntrinsicElements["legend"]) { return ( - + {props.children} ); diff --git a/packages/ui/components/form/select/Select.tsx b/packages/ui/components/form/select/Select.tsx index fbcfd99341..4426851f84 100644 --- a/packages/ui/components/form/select/Select.tsx +++ b/packages/ui/components/form/select/Select.tsx @@ -51,7 +51,7 @@ export const Select = < dropdownIndicator: () => "text-default", control: (state) => cx( - "bg-default border-default !min-h-9 text-sm leading-4 placeholder:text-sm placeholder:font-normal focus-within:ring-2 focus-within:ring-emphasis hover:border-emphasis rounded-md border ", + "bg-default border-default !min-h-9 h-9 text-sm leading-4 placeholder:text-sm placeholder:font-normal focus-within:ring-2 focus-within:ring-emphasis hover:border-emphasis rounded-md border ", state.isMulti ? variant === "checkbox" ? "px-3 py-2" @@ -59,7 +59,7 @@ export const Select = < ? "p-1" : "px-3 py-2" : "py-2 px-3", - props.isDisabled && "bg-gray-100", + props.isDisabled && "bg-muted", props.classNames?.control ), singleValue: () => cx("text-emphasis placeholder:text-muted", props.classNames?.singleValue), diff --git a/packages/ui/components/form/toggleGroup/BooleanToggleGroup.tsx b/packages/ui/components/form/toggleGroup/BooleanToggleGroup.tsx index 588286bdbc..01873f5d88 100644 --- a/packages/ui/components/form/toggleGroup/BooleanToggleGroup.tsx +++ b/packages/ui/components/form/toggleGroup/BooleanToggleGroup.tsx @@ -43,7 +43,7 @@ export const BooleanToggleGroup = function BooleanToggleGroup({ value={yesNoValue} type="single" disabled={disabled} - className="border-subtle flex space-x-2 rounded-md border p-1 rtl:space-x-reverse" + className="border-subtle flex h-9 space-x-2 rounded-md border p-1 rtl:space-x-reverse" onValueChange={(yesNoValue: "yes" | "no") => { setYesNoValue(yesNoValue); onValueChange(boolean(yesNoValue));