0.1.0 • Published 3 years ago
react-bootstrap-touch-spine v0.1.0
React-Bootstrap-TouchSpine
No need for Jquery
Getting Started
Installation
npm install react-bootstrap-touch-spine
Usage
Import Bootstrap style to the project
import 'bootstrap/dist/css/bootstrap.css';
Bootstrap 4.6.0 has already installed.
The component can be used in following ways
const App = () => {
const myCounterHandler = (counter: number) => {
console.log(counter);
};
return (
<React.Fragment>
<TouchSpin counterHandler={myCounterHandler} />
</React.Fragment>
);
};
<TouchSpin
sign={'#'}
signAlignment={Alignment.Left}
step={1}
initValue={0}
size={BsSize.Small}
max={100}
min={-20}
decimals={1}
counterHandler={myCounterHandler}
/>
<TouchSpin
sign={'#'}
signAlignment={Alignment.Right}
step={1}
initValue={0}
size={BsSize.Small}
max={5000}
min={0}
decimals={1}
counterHandler={myCounterHandler}
/>