mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2025-04-28 22:44:43 +00:00
21 lines
569 B
Vue
21 lines
569 B
Vue
<template>
|
|
<component
|
|
:is="to ? 'router-link' : clickable ? 'button' : 'div'"
|
|
:to="to"
|
|
class="flex border-wp-background-400 bg-wp-background-100 dark:bg-wp-background-400 p-4 border rounded-md w-full overflow-hidden"
|
|
:class="{
|
|
'cursor-pointer hover:shadow-md hover:bg-wp-background-300 dark:hover:bg-wp-background-500': clickable || to,
|
|
}"
|
|
>
|
|
<slot />
|
|
</component>
|
|
</template>
|
|
|
|
<script lang="ts" setup>
|
|
import type { RouteLocationRaw } from 'vue-router';
|
|
|
|
defineProps<{
|
|
clickable?: boolean;
|
|
to?: RouteLocationRaw;
|
|
}>();
|
|
</script>
|