UNPKG

react-dayo

Version:

A Queue component for notification etc

38 lines 1.46 kB
var DayoSelector = /** @class */ (function () { function DayoSelector(dayo) { this.dayo = dayo; } DayoSelector.prototype.getQueueComponentProps = function () { return { to: this.dayo.getOption('to'), position: this.dayo.getOption('position'), }; }; // eslint-disable-next-line @typescript-eslint/no-explicit-any DayoSelector.prototype.getBoxComponentProps = function (seedOnCycle) { if (seedOnCycle.BlockComponent === undefined) { throw new Error('BlockComponent is undefined'); } if (seedOnCycle.values === undefined) { throw new Error('Unexpected error'); } return { to: this.dayo.getOption('to'), BlockComponent: seedOnCycle.BlockComponent, additionalProps: seedOnCycle.values.props, theme: seedOnCycle.theme, close: seedOnCycle.close, isEnter: seedOnCycle.cycle.isEnter(), isEntering: seedOnCycle.cycle.isEntering(), isEntered: seedOnCycle.cycle.isEntered(), isExit: seedOnCycle.cycle.isExit(), isExiting: seedOnCycle.cycle.isExiting(), isExited: seedOnCycle.cycle.isExited(), onTransitionEnd: this.dayo.onTransitionEnd(seedOnCycle), }; }; return DayoSelector; }()); export { DayoSelector }; export default DayoSelector; //# sourceMappingURL=dayo-selector.js.map