0.4.3 • Published 5 years ago

react-swedish-personal-identity-number-input v0.4.3

Weekly downloads
21
License
MIT
Repository
github
Last release
5 years ago

React Swedish personal identity number input

A higher order component for formatting values in input elements as Swedish personal identity numbers

Build Status NPM version

Install

$ npm install --save react-swedish-personal-identity-number-input

Usage

import React from 'react';
import { createSwedishPersonalIdentityNumberInput } from 'react-swedish-personal-identity-number-input';

const YourInputComponent = ({ innerRef, ...rest }) => {
  return <input ref={innerRef} {...rest} />;
}

const SwedishPersonalIdentityNumberInput = createSwedishPersonalIdentityNumberInput(YourInputComponent);

const Demo = () => {
  const [value, setValue] = React.useState();

  return <SwedishPersonalIdentityNumberInput value={value} onChange={setValue} />;
}

License

MIT © Jonathan Svenheden

0.4.3

5 years ago

0.4.2

5 years ago

0.4.1

6 years ago

0.4.0

6 years ago

0.3.0

6 years ago

0.2.0

6 years ago

0.1.0

6 years ago