Skip to content

Commit d1533b9

Browse files
committed
Change default to 100ms for increment
1 parent a17098d commit d1533b9

3 files changed

Lines changed: 3 additions & 9 deletions

File tree

src/components/pg/buttonIncrement/__examples__/basic/basic.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
</pg-button-increment>
77
<pg-button-increment part="button2">
88
<pg-icon path="M12,19.2C9.5,19.2 7.29,17.92 6,16C6.03,14 10,12.9 12,12.9C14,12.9 17.97,14 18,16C16.71,17.92 14.5,19.2 12,19.2M12,5A3,3 0 0,1 15,8A3,3 0 0,1 12,11A3,3 0 0,1 9,8A3,3 0 0,1 12,5M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12C22,6.47 17.5,2 12,2Z"></pg-icon>
9-
Clicked <span part="count2">0</span> Times, incrementStepDelay = 100
9+
Clicked <span part="count2">0</span> Times, incrementStepDelay = 50;
1010
</pg-button-increment>
1111
</div>
1212
</div>

src/components/pg/buttonIncrement/__examples__/basic/basic.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export default class XPgButtonBasic extends HTMLElement {
2020
const count = parseInt(this.$count1.textContent, 10);
2121
this.$count1.textContent = `${count + 1}`;
2222
});
23-
this.$button2.incrementStepDelay = 100;
23+
this.$button2.incrementStepDelay = 50;
2424
this.$button2.addEventListener('increment', () => {
2525
const count = parseInt(this.$count2.textContent, 10);
2626
this.$count2.textContent = `${count + 1}`;

src/components/pg/buttonIncrement/buttonIncrement.ts

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ function clearTimers() {
1818
})
1919
export default class PgButtonIncrement extends PgButton {
2020
@Prop(normalizeInt) incrementDelay = 300;
21-
@Prop(normalizeInt) incrementStepDelay = 50;
21+
@Prop(normalizeInt) incrementStepDelay = 100;
2222

2323
connectedCallback() {
2424
super.connectedCallback();
@@ -36,10 +36,4 @@ export default class PgButtonIncrement extends PgButton {
3636
this.$button.addEventListener('pointerup', clearTimers);
3737
this.$button.addEventListener('pointerleave', clearTimers);
3838
}
39-
40-
render(changes) {
41-
if (changes.incrementStepDelay) {
42-
console.log(this.incrementStepDelay, '<<<<');
43-
}
44-
}
4539
}

0 commit comments

Comments
 (0)