primevue-mirror/components/image/Image.d.ts

93 lines
1.9 KiB
TypeScript
Raw Normal View History

2023-03-01 15:05:23 +00:00
/**
*
* Displays an image with preview and tranformation options. For multiple image, see Galleria.
*
* [Live Demo](https://www.primevue.org/image/)
*
* @module image
*
*/
2022-09-06 12:03:37 +00:00
import { VNode } from 'vue';
import { ClassComponent, GlobalComponentConstructor } from '../ts-helpers';
2023-03-01 15:05:23 +00:00
/**
* Defines valid properties in Image component.
*/
2022-09-06 12:03:37 +00:00
export interface ImageProps {
/**
* Controls the preview functionality.
2023-03-01 15:05:23 +00:00
* @defaultValue false
2022-09-06 12:03:37 +00:00
*/
preview?: boolean | undefined;
/**
* Inline style of the image element.
*/
imageStyle?: any;
/**
* Style class of the image element.
*/
imageClass?: any;
}
2023-03-01 15:05:23 +00:00
/**
* Defines valid slots in Image slots.
*/
2022-09-06 12:03:37 +00:00
export interface ImageSlots {
/**
* Custom indicator template.
*/
2023-03-01 15:05:23 +00:00
indicator(): VNode[];
2022-09-06 12:03:37 +00:00
}
2023-03-01 15:05:23 +00:00
export interface ImageEmits {}
2022-09-06 12:03:37 +00:00
2023-03-01 15:05:23 +00:00
/**
* **PrimeVue - Image**
*
* _Displays an image with preview and tranformation options. For multiple image, see Galleria._
*
* [Live Demo](https://www.primevue.org/image/)
* --- ---
* ![PrimeVue](https://primefaces.org/cdn/primevue/images/logo.svg)
*
* @group Component
*
*/
2022-09-06 12:03:37 +00:00
declare class Image extends ClassComponent<ImageProps, ImageSlots, ImageEmits> {
/**
* Triggered when the preview overlay is shown.
*
* @memberof Image
*/
2023-03-01 15:05:23 +00:00
show(): void;
2022-09-06 12:03:37 +00:00
/**
* Triggered when the preview overlay is hidden.
*
* @memberof Image
*/
2023-03-01 15:05:23 +00:00
hide(): void;
2022-09-06 12:03:37 +00:00
/**
* Triggered when an error occurs while loading an image file.
2022-09-14 11:26:01 +00:00
*
2022-09-06 12:03:37 +00:00
* @memberof Image
*/
2023-03-01 15:05:23 +00:00
error(): void;
2022-09-06 12:03:37 +00:00
}
declare module '@vue/runtime-core' {
interface GlobalComponents {
2022-09-14 11:26:01 +00:00
Image: GlobalComponentConstructor<Image>;
2022-09-06 12:03:37 +00:00
}
}
/**
*
* Displays an image with preview and tranformation options. For multiple image, see Galleria.
*
* Demos:
*
2023-03-02 09:22:22 +00:00
* - [Image](https://primevue.org/image)
2022-09-06 12:03:37 +00:00
*
*/
export default Image;