@mugiranezaj/counter
v1.1.2
Published
The `Counter` component allows users to increment, decrement, and reset a counter with configurable settings.
Readme
Counter Component Documentation
Description
The Counter component allows users to increment, decrement, and reset a counter with configurable settings.
Props
| Prop | Type | Default | Description |
| -------------- | ------ | ----------- | --------------------------------------- |
| title | String | "Counter" | The title displayed above the counter. |
| initialCount | Number | 0 | The initial value of the counter. |
| step | Number | 1 | The step value for increment/decrement. |
| resetValue | Number | 0 | The value to reset the counter to. |
Methods
| Method | Description |
| ----------- | ---------------------------------------- |
| increment | Increases the counter by the step value. |
| decrement | Decreases the counter by the step value. |
| reset | Resets the counter to the reset value. |
Usage
<Counter title="My Counter" :initialCount="10" :step="5" :resetValue="0" />