@hixme-ui/social-security
v2.2.0
Published
hixme-ui social security component for consistent formatting.
Downloads
38
Readme
Social Security
npm i --save @hixme-ui/social-security
Phone extends the @hixme/text to provide social security number formatting
Usage
import SocialSecurity from '@hixme-ui/social-security'
<SocialSecurity number='123456789' />
// ouputs social security format
// <span>***-**-6789</span>
SocialSecurity.format(number, { showFull = false })
SocialSecurity has a format function it uses to display, and is accessible if needed outside of the JSX
import SocialSecurity from '@hixme-ui/social-security'
Phone.format('123456789')
// outputs string ***-**-6789
Phone.format('123456789', { showFull: true })
// outputs string 123-45-6789