EstateChain/my-app/components/send-payment/payment-destination.tsx
2024-10-12 23:01:29 +03:00

41 lines
1.0 KiB
TypeScript

import React, { ChangeEvent } from "react";
import { Button, Heading, Input } from "@stellar/design-system";
interface PaymentDestProps {
destination: string;
setDestination: (address: string) => void;
onClick: () => void;
}
export const PaymentDest = (props: PaymentDestProps) => {
const handleChange = (event: ChangeEvent<HTMLInputElement>) => {
props.setDestination(event.target.value);
};
return (
<>
<Heading as="h1" size="sm">
Choose a Payment Destination
</Heading>
<Input
fieldSize="md"
id="input-destination"
label="Destination Account"
value={props.destination}
onChange={handleChange}
/>
<div className="submit-row-destination">
<Button
size="md"
variant="tertiary"
isFullWidth
onClick={props.onClick}
disabled={props.destination.length < 1}
>
Next
</Button>
</div>
</>
);
};