primevue-mirror/apps/showcase/api-generator/components/image.js

99 lines
2.3 KiB
JavaScript
Raw Normal View History

const ImageProps = [
{
2022-09-14 14:26:41 +00:00
name: 'preview',
type: 'boolean',
default: 'false',
description: 'Controls the preview functionality.'
2023-03-24 13:44:45 +00:00
},
{
name: 'indicatorIcon',
type: 'string',
default: 'pi pi-eye',
description: 'Custom indicator icon.'
2023-04-10 10:35:15 +00:00
},
{
name: 'zoomInDisabled',
type: 'boolean',
default: 'false',
description: 'Disable the zoom-in button'
},
{
name: 'zoomOutDisabled',
type: 'boolean',
default: 'false',
description: 'Disable the zoom-out button'
2023-05-11 12:14:03 +00:00
},
2023-05-04 07:45:01 +00:00
{
name: 'pt',
type: 'any',
default: 'null',
2023-08-01 14:01:12 +00:00
description: 'Used to pass attributes to DOM elements inside the component.'
2023-07-06 13:20:37 +00:00
},
{
name: 'unstyled',
type: 'boolean',
default: 'false',
description: 'When enabled, it removes component related styles in the core.'
}
];
const ImageEvents = [
{
2022-09-14 14:26:41 +00:00
name: 'show',
description: 'Triggered when the preview overlay is shown.'
},
{
2022-09-14 14:26:41 +00:00
name: 'hide',
description: 'Triggered when the preview overlay is hidden.'
},
{
2022-09-14 14:26:41 +00:00
name: 'error',
description: 'Triggered when an error occurs while loading an image file.'
}
];
const ImageSlots = [
{
2022-09-14 14:26:41 +00:00
name: 'indicator',
description: 'Custom content for the preview indicator.'
},
{
name: 'refresh',
description: 'Custom content for the component refresh.'
},
{
name: 'undo',
description: 'Custom content for the component undo.'
},
{
name: 'zoomout',
description: 'Custom content for the component zoomout.'
},
{
name: 'zoomin',
description: 'Custom content for the component zoomin.'
},
{
name: 'close',
description: 'Custom content for the component close.'
2023-04-29 18:43:56 +00:00
},
{
name: 'image',
description: 'Custom content for the component image.'
},
{
name: 'preview',
2023-04-29 18:43:56 +00:00
description: 'Custom content for the component preview.'
}
];
module.exports = {
image: {
2022-09-14 14:26:41 +00:00
name: 'Image',
description: 'Displays an image with preview and tranformation options.',
props: ImageProps,
events: ImageEvents,
slots: ImageSlots
}
};