primeng
Version:
PrimeNG is an open source UI library for Angular featuring a rich set of 80+ components, a theme designer, various theme alternatives such as Material, Bootstrap, Tailwind, premium templates and professional support. In addition, it integrates with PrimeB
62 lines (59 loc) • 1.72 kB
TypeScript
import { TemplateRef } from '@angular/core';
import { MotionOptions } from '@primeuix/motion';
import { PassThroughOption, PassThrough } from 'primeng/api';
import { ButtonPassThrough } from 'primeng/types/button';
/**
* Custom pass-through(pt) options.
* @template I Type of instance.
*
* @see {@link ScrollTop.pt}
* @group Interface
*/
interface ScrollTopPassThroughOptions<I = unknown> {
/**
* Used to pass attributes to the host's DOM element.
*/
host?: PassThroughOption<HTMLElement, I>;
/**
* Used to pass attributes to the root's DOM element.
*/
root?: PassThroughOption<HTMLElement, I>;
/**
* Used to pass attributes to the Button component.
* @see {@link ButtonPassThrough}
*/
pcButton?: ButtonPassThrough;
/**
* Used to pass options to the motion component/directive.
*/
motion?: MotionOptions;
}
/**
* Defines valid pass-through options in ScrollTop.
* @see {@link ScrollTopPassThroughOptions}
*
* @template I Type of instance.
*/
type ScrollTopPassThrough<I = unknown> = PassThrough<I, ScrollTopPassThroughOptions<I>>;
/**
* Custom icon template context.
* @group Interface
*/
interface ScrollTopIconTemplateContext {
/**
* Style class of the icon.
*/
styleClass: string;
}
/**
* Defines valid templates in ScrollTop.
* @group Templates
*/
interface ScrollTopTemplates {
/**
* Custom icon template.
* @param {ScrollTopIconTemplateContext} context - icon context.
*/
icon(context: ScrollTopIconTemplateContext): TemplateRef<ScrollTopIconTemplateContext>;
}
export type { ScrollTopIconTemplateContext, ScrollTopPassThrough, ScrollTopPassThroughOptions, ScrollTopTemplates };