@asurraa/sura-ui-input-phone
v1.0.5
Published
Utilities function use internally at AsurRaa.
Downloads
4
Keywords
Readme
@asurraa/sura-ui-input-phone
Sura UI Input Phone Number Component
Use to input a number with the mouse and keyboard and usually use under AsurRaaModal Components. See more detail about the modal here.
A numberic value is required
yarn add @asurraa/sura-ui-input-phone
Example
import { Logger } from "@asurraa/sura-ui-utilities";
// Logger
const ModalWrapper = (
<Fragment>
<AsurRaaModal
title={
isEditableNull
? `${t("Create Appointments")}`
: `${t("Edit Appointments")}`
}
visible={openModal}
isSubmitLoading={isSubmitting}
onCancel={() => {
setOpenModal(false);
setEditableData(undefined);
reset();
}}
onOk={handleSubmit(onSubmit)}
>
//* other controllers
<Controller
name="phone"
control={createCustomerControl}
defaultValue={""}
render={({ field: { onChange, value } }) => (
<div>
<InputHeader>Phone Number</InputHeader>
<AsurRaaMiniPhoneInput onChange={onChange} value={value} />
</div>
)}
/>
<div style={{ marginTop: 20 }} />
</form>
</AsurRaaModal>
</Fragment>
);
return (
<Fragment>
{ModalWrapper}
// other jsx components
</Fragment>
)