1
0
Fork 0
freesewing/markdown/dev/reference/api/part/config/options/counter/en.md

38 lines
768 B
Markdown
Raw Normal View History

2022-09-21 09:55:21 +02:00
---
2022-09-21 12:28:58 +02:00
title: Counter options
2022-09-21 09:55:21 +02:00
---
For a given number of things, use a counter option.
Counters are for integers only. Things like number of buttons and so on.
## Structure
Your counter option should be a plain object with these properties:
- `count` : The default integer value
- `min` : The minimum integer value that's allowed
2022-09-21 09:55:21 +02:00
- `max` : The maximum integer value that's allowed
2022-09-21 12:28:58 +02:00
<Tip>
Like all options that are configured through an object, you can
add more properties to the options' object to implement functionality on
top of what's provided by the core library.
Refer to [extending options](/reference/api/part/config/options/extend) for
more details.
</Tip>
2022-09-21 09:55:21 +02:00
## Example
```js
options: {
butttons: {
count: 7,
min: 4,
max: 12
}
}
```