1
0
Fork 0
mirror of https://gitlab.com/bramw/baserow.git synced 2025-04-12 16:28:06 +00:00
bramw_baserow/web-frontend/modules/database/components/card/RowCardFieldButton.vue

26 lines
718 B
Vue

<template functional>
<div class="card-button">
<a
v-if="$options.methods.isValid(props.value)"
:href="props.value && props.value.url"
target="_blank"
rel="nofollow noopener noreferrer"
class="button button--tiny button--ghost forced-pointer-events-auto"
@mousedown.stop
>
{{ $options.methods.getLabelOrURL(props.value) }}
</a>
<a v-else class="button button--tiny button--ghost disabled">
{{ $options.methods.getLabelOrURL(props.value) }}
</a>
</div>
</template>
<script>
import linkURLField from '@baserow/modules/database/mixins/linkURLField'
export default {
name: 'RowCardFieldButton',
mixins: [linkURLField],
height: 16,
}
</script>