| 1 |
"use strict"; |
| 2 |
class CountDownFunctions { |
| 3 |
constructor(props) { |
| 4 |
this.props = props; |
| 5 |
|
| 6 |
this.isShowDays = 'undefined' === typeof this.props.showDays || true === this.props.showDays ? true : false; |
| 7 |
console.log(this.isShowDays); |
| 8 |
|
| 9 |
} |
| 10 |
|
| 11 |
// stopTimer() { |
| 12 |
// if (false !== this.props.timerInterval) { |
| 13 |
// clearInterval(this.props.timerInterval); |
| 14 |
// this.props.setState({ |
| 15 |
// timerInterval: false |
| 16 |
// }); |
| 17 |
// } |
| 18 |
// } |
| 19 |
|
| 20 |
// onChangeDate(date) { |
| 21 |
// setAttributes({ dateTime: date }); |
| 22 |
// if (false !== this.props.timerInterval) { |
| 23 |
// clearInterval(this.props.timerInterval); |
| 24 |
// initializeCountDown(); |
| 25 |
// } |
| 26 |
// } |
| 27 |
|
| 28 |
togglecalender() { |
| 29 |
this.props.setState((state) => ({ isCalenderVisible: !state.isCalenderVisible })); |
| 30 |
} |
| 31 |
|
| 32 |
onChangeAttrs(attrs) { |
| 33 |
this.props.setAttributes(attrs) |
| 34 |
} |
| 35 |
} |
| 36 |
|
| 37 |
export const testFun = () => { |
| 38 |
console.log("props->>>",props); |
| 39 |
|
| 40 |
} |
| 41 |
|
| 42 |
export default CountDownFunctions; |