@hixme-ui/phone
v2.2.0
Published
hixme-ui phone component for linking and formatting phone numbers.
Downloads
84
Readme
Phone
npm i --save @hixme-ui/phone
Phone extends the @hixme/text to provide phone formatting and linking
Usage
import Phone from '@hixme-ui/phone'
<Phone number='8881234567' />
// ouputs phone link as
// <a href="tel:8881234567">(888) 123 - 4567</a>
Phone.format
Phone has a format function it uses to display the phone format, and is accessible if needed outside of the JSX
import Phone from '@hixme-ui/phone'
Phone.format('8881234567')
// outputs string (888) 123 - 4567