Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | 5x 5x 5x 5x 37x 37x 37x 5x | import React, { memo, useMemo, FunctionComponent } from 'react';
import { TranslatedString } from '../locale';
import { CheckboxFormField } from '../ui/form';
export interface BillingSameAsShippingFieldProps {
onChange?(isChecked: boolean): void;
}
const BillingSameAsShippingField: FunctionComponent<BillingSameAsShippingFieldProps> = ({
onChange,
}) => {
const labelContent = useMemo(() => (
<TranslatedString id="billing.use_shipping_address_label" />
), []);
return <CheckboxFormField
id="sameAsBilling"
labelContent={ labelContent }
name="billingSameAsShipping"
onChange={ onChange }
/>;
};
export default memo(BillingSameAsShippingField);
|