Package Exports
- change-day-night
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (change-day-night) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
change-day-night
Listening to day night changes
install
npm install --save npm i change-day-night
create
new DayNightTheme({ dayStart, dayEnd, didChangeDayNight });
sample
new DayNightTheme({ dayEnd: { hour: 14, minute: 26 }, didChangeDayNight: this.didChangeDayNight });
arguments
- dayStart - start of the day session. moment acceptable object which defines hour and minute. optional, default is { hour: 6 }
- dayEnd - end of the day session. moment acceptable object which defines hour and minute. optional, default is { hour: 18 }
- didChangeDayNight - triggers with the theme value after changing the day to night or night to day. this is required.
methods
- start - start listening to day/night changes.
- stop - stop listening to day/night changes.