UNPKG

zmp-core

Version:

Full featured mobile HTML framework for building iOS & Android apps

42 lines (31 loc) 1.56 kB
import ZMP from '../app/app-class'; import { CSSSelector, ZMPPlugin } from '../app/app-class'; export namespace Accordion { interface AppMethods { accordion: { /** open specified accordion item */ open(el: HTMLElement | CSSSelector): void; /** close specified accordion item */ close(el: HTMLElement | CSSSelector): void; /** toggle specified accordion item */ toggle(el: HTMLElement | CSSSelector): void; }; } interface AppParams {} interface AppEvents { /** Event will be triggered before accordion content starts its opening animation */ accordionBeforeOpen: (el: HTMLElement | CSSSelector, prevent: () => void) => void; /** Event will be triggered when accordion content starts its opening animation */ accordionOpen: (el: HTMLElement | CSSSelector) => void; /** Event will be triggered after accordion content completes its opening animation */ accordionOpened: (el: HTMLElement | CSSSelector) => void; /** Event will be triggered before accordion content starts its closing animation */ accordionBeforeClose: (el: HTMLElement | CSSSelector, prevent: () => void) => void; /** Event will be triggered when accordion content starts its closing animation */ accordionClose: (el: HTMLElement | CSSSelector) => void; /** Event will be triggered after accordion content completes its closing animation */ accordionClosed: (el: HTMLElement | CSSSelector) => void; } } declare const AccordionComponent: ZMPPlugin; export default AccordionComponent;