Dropdown and input width set to full

This commit is contained in:
Lucas Oliveira 2023-05-29 19:59:03 -03:00
commit 9f1d64b93f
3 changed files with 5 additions and 5 deletions

View file

@ -23,9 +23,9 @@ export default function Dropdown({
> >
{({ open }) => ( {({ open }) => (
<> <>
<div className="relative mt-1"> <div className="relative mt-1 w-full">
<Listbox.Button className="relative w-full cursor-default rounded-md border border-gray-300 bg-white dark:bg-gray-900 py-2 pl-3 pr-10 text-left shadow-sm focus:border-indigo-500 focus:outline-none focus:ring-1 focus:ring-indigo-500 sm:text-sm"> <Listbox.Button className="relative w-full cursor-default rounded-md border border-gray-300 bg-white dark:bg-gray-900 py-2 pl-3 pr-10 text-left shadow-sm focus:border-indigo-500 focus:outline-none focus:ring-1 focus:ring-indigo-500 sm:text-sm">
<span className="block w-max truncate">{internalValue}</span> <span className="block truncate w-full">{internalValue}</span>
<span className="pointer-events-none absolute inset-y-0 right-0 flex items-center pr-2"> <span className="pointer-events-none absolute inset-y-0 right-0 flex items-center pr-2">
<ChevronUpDownIcon <ChevronUpDownIcon
className="h-5 w-5 text-gray-400" className="h-5 w-5 text-gray-400"

View file

@ -15,7 +15,7 @@ export default function FloatComponent({
} }
}, [disabled, onChange]); }, [disabled, onChange]);
return ( return (
<div className={disabled ? "pointer-events-none cursor-not-allowed" : ""}> <div className={"w-full " + (disabled ? "pointer-events-none cursor-not-allowed" : "")}>
<input <input
type="number" type="number"
value={myValue} value={myValue}

View file

@ -16,9 +16,9 @@ export default function IntComponent({
}, [disabled, onChange]); }, [disabled, onChange]);
return ( return (
<div <div
className={ className={"w-full " + (
disabled ? "pointer-events-none cursor-not-allowed w-full" : "w-full" disabled ? "pointer-events-none cursor-not-allowed w-full" : "w-full"
} )}
> >
<input <input
onKeyDown={(event) => { onKeyDown={(event) => {