From 207a5394f583bfc69e73be89c7b249c114c65e31 Mon Sep 17 00:00:00 2001 From: wil Date: Thu, 4 Apr 2024 10:41:45 -0400 Subject: [PATCH 1/2] fixed label input warnings --- app/components/Input.tsx | 13 ++++++++++--- app/components/Textarea.tsx | 10 +++++++++- app/components/Typography.tsx | 12 ++++++++++-- .../comps/SidePanelTabs/TabStylization.tsx | 6 ++++-- app/utilities.tsx | 4 ++++ 5 files changed, 37 insertions(+), 8 deletions(-) create mode 100644 app/utilities.tsx diff --git a/app/components/Input.tsx b/app/components/Input.tsx index a8ce2232f9..2d5ebbfe6d 100644 --- a/app/components/Input.tsx +++ b/app/components/Input.tsx @@ -2,17 +2,23 @@ import { twMerge } from "tailwind-merge"; import { IconDefinition } from "@fortawesome/pro-solid-svg-icons"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { Label } from "./Typography"; +import { kebabCase } from "~/utilities"; interface InputProps extends React.InputHTMLAttributes { label?: string; - className?: string; icon?: IconDefinition } -export function Input({label, icon, className, ...rest }: InputProps) { +export function Input({ + label, icon, className, id, ...rest +}: InputProps) { return (
- {label && } + {label && + + }
{icon && ( @@ -22,6 +28,7 @@ export function Input({label, icon, className, ...rest }: InputProps) { /> )} & { label?: string; @@ -22,8 +24,14 @@ export const Textarea = ({ }) => { return (
- {label && } + {label && + + } +