persian-numbers-input
v0.0.4
Published
[![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettier)
Downloads
2
Readme
persian-numbers-input
simple persian input that convert persian numbers to english numbers seperate them 3 by 3 and you can customize with tailwind using className and inline style and you can use it with react-hook-form and ant-design
Prerequisites
This project requires NodeJS (version 12 or later) and NPM. Node and NPM are really easy to install.
$ npm -v && node -v
6.4.1
v8.16.0
Table of contents
Installation
BEFORE YOU INSTALL: please read the prerequisites
To install and set up the library, run:
$ npm install --save-dev persian-numbers-input
Or if you prefer using Yarn:
$ yarn add --dev persian-numbers-input
Usage
import { PersianNumericFormat } from 'persian-numbers-input';
const App: React.Fc = () => {
return (
<div>
<PersianNumericFormat />
</div>
);
};
export default App;
Props
| Type | Default value | Description | | ----------- | ------------------------- | -------------------------- | | value | String | the input value | | ------ | ------------- | -------------------- | | onChange | (event) => void | the input onchange | | ------ | ------------- | -------------------- | | placeholder | string | the input placeholder | | ------ | ------------- | -------------------- | | className | string | the input className | | ------ | ------------- | -------------------- | | prefix | string | the input prefix | | ------ | ------------- | -------------------- | | postfix | string | the input postfix | | ------ | ------------- | -------------------- | | formatter | (value: string) => string | the input formatter | | ------ | ------------- | -------------------- | | styles | {} | the input container styles |
Contributing
for contributing please contact me in [telegram] : https://t.me/hashemianm
Authors
- seyyed mohammad javad hashemian - front end developer - SeyyedMohammadJavadHashemian