Socket
Socket
Sign inDemoInstall

chalo-phone-format

Package Overview
Dependencies
300
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    chalo-phone-format

A React component to build a customized UI of https://www.npmjs.com/package/react-number-format


Version published
Weekly downloads
4
increased by33.33%
Maintainers
1
Install size
29.5 MB
Created
Weekly downloads
 

Readme

Source

Welcome to chalo-phone-format!

Hi! It's a React component to build a customized UI of https://www.npmjs.com/package/react-number-format.

It's too a input phone for React.

Install-package

  • npm install chalo-phone-format
  • yarn add chalo-phone-format

What does it?

Example

  • You can define your own format.
  • You can define your own mask.

How to implated it?

You can see the example complete in directory src/example/ExampleImplementation.js

    // src/example/ExampleImplementation.js
    ...
    //It's a method to change the value in Phone
    handleChange(value) {
        console.log(value);
    }

    render () {
        return (<div className="container">
          <Phone
            //(Optional) It's the value by default
            value={"2151234455"}
            handleChange={this.handleChange}
            //(Optional) It wil add a field more in respuest
            //formatOK:true --> meets the format
            //formatOK:false --> not meets the format
            isFormatOK={true}
            //(Optional) you can define your own format.
            //** It's mandatory to use the # character to represent the numbers.
            //format="(###) ###-####"
            //(Optional) You can define your own mask
            //mask="-"
           />
        </div>)
    }
    }

Keywords

FAQs

Last updated on 02 Sep 2019

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc