Skip to content

Commit fdd298d

Browse files
committed
Improve checkout design
1 parent 5d5437b commit fdd298d

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

refactor/src/components/Checkout/Billing.component.tsx

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,17 @@
11
// Imports
2-
import { useForm } from 'react-hook-form';
2+
import { FieldValues, SubmitHandler, useForm } from 'react-hook-form';
33

44
// Components
55
import { InputField } from '@/components/Input/InputField.component';
6+
import Button from '../UI/Button.component';
67

78
// Constants
89
import { INPUT_FIELDS } from '@/utils/constants/INPUT_FIELDS';
910

11+
interface IBillingProps {
12+
onSubmit: SubmitHandler<FieldValues>;
13+
}
14+
1015
const OrderButton = ({ register }: any) => (
1116
<div className="w-full p-2">
1217
<input
@@ -17,13 +22,13 @@ const OrderButton = ({ register }: any) => (
1722
checked
1823
{...register('paymentMethod')}
1924
/>
20-
<button className="flex px-4 py-2 mx-auto font-bold bg-white border border-gray-400 border-solid rounded hover:bg-gray-400">
21-
BESTILL
22-
</button>
25+
<div className="mt-4 flex justify-center">
26+
<Button>BESTILL</Button>
27+
</div>
2328
</div>
2429
);
2530

26-
const Billing = ({ onSubmit }: any) => {
31+
const Billing = ({ onSubmit }: IBillingProps) => {
2732
const {
2833
register,
2934
handleSubmit,

0 commit comments

Comments
 (0)