Cleaner URL bar and some improvements

This commit is contained in:
Gregory Schier
2023-02-22 15:58:04 -08:00
parent 784cb53ec6
commit a4dbfed712
8 changed files with 191 additions and 77 deletions

View File

@@ -7,12 +7,21 @@ interface Props extends InputHTMLAttributes<HTMLInputElement> {
label: string;
hideLabel?: boolean;
labelClassName?: string;
containerClassName?: string;
}
export function Input({ label, labelClassName, hideLabel, className, name, ...props }: Props) {
export function Input({
label,
containerClassName,
labelClassName,
hideLabel,
className,
name,
...props
}: Props) {
const id = `input-${name}`;
return (
<VStack className="w-full">
<VStack className={classnames(containerClassName, 'w-full')}>
<label
htmlFor={name}
className={classnames(
@@ -27,7 +36,7 @@ export function Input({ label, labelClassName, hideLabel, className, name, ...pr
id={id}
className={classnames(
className,
'w-0 min-w-[100%] border-2 border-gray-100 bg-gray-50 h-10 pl-3 pr-2 rounded-md text-sm focus:outline-none',
'w-0 min-w-[100%] bg-gray-50 h-10 pl-3 pr-2 rounded-md text-sm focus:outline-none',
)}
{...props}
/>