Sha256: 201e642bedceb2c3e9da95a1215a725952dba7c627afc7bc42ec14a406866004

Contents?: true

Size: 618 Bytes

Versions: 16

Compression:

Stored size: 618 Bytes

Contents

import React, { useState } from "react";
import { PhoneNumberInput, Body } from "playbook-ui";

const PhoneNumberInputFormat = (props) => {
    const [phoneNumber, setPhoneNumber] = useState("");

    const handleOnChange = ({ number }) => {
        setPhoneNumber(number);
    };

    return (
        <>
            <PhoneNumberInput
                formatAsYouType
                id="format"
                onChange={handleOnChange}
                {...props}
            />
            {phoneNumber && <Body>Unformatted number: {phoneNumber}</Body>}
        </>
    );
};

export default PhoneNumberInputFormat;

Version data entries

16 entries across 16 versions & 2 rubygems

Version Path
playbook_ui_docs-14.11.1.pre.alpha.PLAY17445539 app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_format.jsx
playbook_ui-14.11.1.pre.alpha.PLAY17445539 app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_format.jsx
playbook_ui_docs-14.11.1.pre.alpha.PBNTR798datepickerturbo5537 app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_format.jsx
playbook_ui-14.11.1.pre.alpha.PBNTR798datepickerturbo5537 app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_format.jsx
playbook_ui_docs-14.11.1.pre.alpha.pbntr703collapsiblerowsrails5536 app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_format.jsx
playbook_ui-14.11.1.pre.alpha.pbntr703collapsiblerowsrails5536 app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_format.jsx
playbook_ui_docs-14.11.1.pre.alpha.PLAY1751pbcontenttagpt25529 app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_format.jsx
playbook_ui-14.11.1.pre.alpha.PLAY1751pbcontenttagpt25529 app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_format.jsx
playbook_ui_docs-14.11.1.pre.alpha.PBNTR7495495 app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_format.jsx
playbook_ui-14.11.1.pre.alpha.PBNTR7495495 app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_format.jsx
playbook_ui_docs-14.12.0.pre.rc.11 app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_format.jsx
playbook_ui-14.12.0.pre.rc.11 app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_format.jsx
playbook_ui_docs-14.12.0.pre.rc.10 app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_format.jsx
playbook_ui-14.12.0.pre.rc.10 app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_format.jsx
playbook_ui_docs-14.11.1.pre.alpha.PLAY1720phonenumberinputformatAsYouType5377 app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_format.jsx
playbook_ui-14.11.1.pre.alpha.PLAY1720phonenumberinputformatAsYouType5377 app/pb_kits/playbook/pb_phone_number_input/docs/_phone_number_input_format.jsx