1
0
mirror of https://gitlab.com/bramw/baserow.git synced 2024-11-25 08:47:54 +00:00
bramw_baserow/web-frontend/modules/builder/components/elements/baseComponents/ABImage.vue
2024-09-03 14:34:20 +00:00

47 lines
722 B
Vue

<template>
<div class="ab-image">
<img
class="ab-image__img"
:alt="alt"
:src="src"
:loading="lazy ? 'lazy' : null"
/>
</div>
</template>
<script>
/**
* @typedef ABImage
*/
export default {
name: 'ABImage',
props: {
/**
* @type {String} - Alternative text to image.
*/
alt: {
type: String,
required: false,
default: '',
},
/**
* @type {String} - Image url.
*/
src: {
type: String,
required: false,
default: '',
},
/**
* @type {Boolean} - Whether the image should be loaded lazily.
*/
lazy: {
type: Boolean,
required: false,
default: true,
},
},
}
</script>