primevue-mirror/components/lib/image/style/ImageStyle.js

37 lines
1.0 KiB
JavaScript
Raw Normal View History

import BaseStyle from 'primevue/base/style';
const classes = {
root: ({ props }) => [
'p-image p-component',
{
2024-04-10 06:16:00 +00:00
'p-image-preview': props.preview
}
],
image: ({ props }) => props.image,
2024-04-10 06:16:00 +00:00
button: 'p-image-preview-mask',
icon: 'p-image-preview-icon',
mask: 'p-image-mask p-component-overlay p-component-overlay-enter',
toolbar: 'p-image-toolbar',
2024-04-10 06:16:00 +00:00
rotateRightButton: 'p-image-action p-image-rotate-right-button',
rotateLeftButton: 'p-image-action p-image-rotate-left-button',
zoomOutButton: ({ instance }) => [
2024-04-10 06:16:00 +00:00
'p-image-action p-image-zoom-out-button',
{
'p-disabled': instance.isZoomOutDisabled
}
],
zoomInButton: ({ instance }) => [
2024-04-10 06:16:00 +00:00
'p-image-action p-image-zoom-in-button',
{
'p-disabled': instance.isZoomInDisabled
}
],
2024-04-10 06:16:00 +00:00
closeButton: 'p-image-action p-image-close-button',
preview: 'p-image-original'
};
export default BaseStyle.extend({
name: 'image',
classes
});