Optional
initialProps: StaticProps & ChangeablePropsInitial properties
Defines if you need to call init
at the constructor's end.
If you want to add responsive properties, set this parameter to false
.
interface IStaticProps extends NModule.IStaticProps {
staticName: 'My name';
}
interface IChangeableProps extends NModule.IChangeableProps {
weight: number;
height: number;
}
interface ICallbacks extends NModule.ICallbacksTypes {}
const module = new Module<IStaticProps, IChangeableProps, ICallbacks>(
{
staticName: 'My name',
weight: 70,
height: 175,
},
false
);
module.addResponsiveProps({
breakpoint: 'viewport_phone',
settings: {
weight: 80,
},
});
module.init();
module.addCallback('propsMutate', () => console.log('mutate props'));
module.addCallback('destroy', () => console.log('destroy'));
Private
Optional
_pluginsInner plugins
Vevet Application
The module is destroyed
The module is initialized
Module name
Module prefix
Current properties
Protected
_destroyPrivate
_destroyProtected
_getProtected
_initProtected
_onAdd a module callback
Protected
addAdd a DOM event listener
Optional
options: IAddEventListenerOptionsAdd a single plugin
Add responsive rules
Add a viewport callback that will be removed on class destroy
Protected
classProtected
toggle
A class for Components.