@asurraa/sura-ui-input-phone
TypeScript icon, indicating that this package has built-in type declarations

1.0.5 • Public • Published

Storybook

@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>
  )

Readme

Keywords

none

Package Sidebar

Install

npm i @asurraa/sura-ui-input-phone

Weekly Downloads

0

Version

1.0.5

License

none

Unpacked Size

6.54 kB

Total Files

9

Last publish

Collaborators

  • vichea
  • themkimhong
  • lyhourchhen
  • duongkimseng