mirror of
https://github.com/Hestia-Homes/assessment-model.git
synced 2026-06-08 11:37:25 +00:00
Getting search looking decent
This commit is contained in:
parent
f975652208
commit
42fa72a315
2 changed files with 46 additions and 18 deletions
19
src/app/components/search/SubmitButton.tsx
Normal file
19
src/app/components/search/SubmitButton.tsx
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
interface SubmitButtonProps {
|
||||
buttonDisabled: boolean;
|
||||
redirectFunc: () => void;
|
||||
}
|
||||
|
||||
const SubmitButton = ({ buttonDisabled, redirectFunc }: SubmitButtonProps) => {
|
||||
return (
|
||||
<button
|
||||
type="button"
|
||||
disabled={buttonDisabled}
|
||||
onClick={redirectFunc}
|
||||
className="focus:shadow-outline mt-3 rounded bg-brandtan px-4 py-2 font-bold text-white shadow hover:bg-hovertan focus:outline-none disabled:opacity-25 disabled:hover:bg-hovetan"
|
||||
>
|
||||
Submit
|
||||
</button>
|
||||
);
|
||||
};
|
||||
|
||||
export default SubmitButton;
|
||||
|
|
@ -39,24 +39,33 @@ export default function Search() {
|
|||
};
|
||||
|
||||
return (
|
||||
<div className="flex min-h-screen flex-col items-center pt-40">
|
||||
<form>
|
||||
<label
|
||||
className="mb-2 block text-sm font-bold text-gray-700"
|
||||
htmlFor="search"
|
||||
>
|
||||
Enter your postcode to get started
|
||||
</label>
|
||||
<input
|
||||
id="search"
|
||||
className="w-full appearance-none rounded border-2 border-gray-200 bg-gray-200 px-4 py-2 leading-tight text-gray-700 focus:border-brandmidblue focus:bg-white focus:outline-none"
|
||||
type="text"
|
||||
placeholder="Enter your postcode"
|
||||
onChange={handlePostcodeChange}
|
||||
onKeyDown={handleSubmit}
|
||||
/>
|
||||
<SubmitButton {...submitProps} />
|
||||
</form>
|
||||
<div className="flex min-h-screen flex-col items-center pt-20">
|
||||
<div className="w-1/2 flex flex-col justify-center bg-gray-100 rounded p-4 shadow-md">
|
||||
<div className="w-full flex justify-center text-center mb-7 text-gray-700">
|
||||
We'll search for the most recent data about your property, so we can
|
||||
begin to build a profile of the works that can be done and the impact
|
||||
that will have
|
||||
</div>
|
||||
<form className="w-full flex flex-col items-center">
|
||||
<label
|
||||
className="mb-2 block text-sm font-bold text-gray-700 text-center"
|
||||
htmlFor="search"
|
||||
>
|
||||
Enter your postcode to get started
|
||||
</label>
|
||||
<div className="flex justify-center">
|
||||
<input
|
||||
id="search"
|
||||
className="w-full appearance-none rounded border-2 border-gray-200 bg-gray-200 px-8 py-2 leading-tight text-gray-700 focus:border-brandmidblue focus:bg-white focus:outline-none"
|
||||
type="text"
|
||||
placeholder="Enter your postcode"
|
||||
onChange={handlePostcodeChange}
|
||||
onKeyDown={handleSubmit}
|
||||
/>
|
||||
</div>
|
||||
<SubmitButton {...submitProps} />
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue