feat(alert): Handle link as button (#25)

This commit is contained in:
Baptiste Leproux
2022-01-18 15:39:30 +01:00
committed by GitHub
parent adbee9c717
commit b2187374f6

View File

@@ -9,13 +9,14 @@
{{ title }} {{ title }}
</p> </p>
<p v-if="link" class="mt-3 text-sm leading-5 md:mt-0 md:ml-6"> <p v-if="link" class="mt-3 text-sm leading-5 md:mt-0 md:ml-6">
<NuxtLink <Link
:to="to" :to="to"
class="whitespace-nowrap font-medium" class="whitespace-nowrap font-medium"
:class="linkClass" :class="linkClass"
@click="click && click()"
> >
{{ link }} &rarr; {{ link }} &rarr;
</NuxtLink> </Link>
</p> </p>
</div> </div>
</div> </div>
@@ -24,10 +25,12 @@
<script> <script>
import Icon from '../elements/Icon' import Icon from '../elements/Icon'
import Link from '../elements/Link'
export default { export default {
components: { components: {
Icon Icon,
Link
}, },
props: { props: {
variant: { variant: {
@@ -41,6 +44,10 @@ export default {
type: [String, Object], type: [String, Object],
default: null default: null
}, },
click: {
type: Function,
default: null
},
title: { title: {
type: String, type: String,
default: null default: null