mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-14 20:19:34 +01:00
feat(alert): Handle link as button (#25)
This commit is contained in:
@@ -9,13 +9,14 @@
|
||||
{{ title }}
|
||||
</p>
|
||||
<p v-if="link" class="mt-3 text-sm leading-5 md:mt-0 md:ml-6">
|
||||
<NuxtLink
|
||||
<Link
|
||||
:to="to"
|
||||
class="whitespace-nowrap font-medium"
|
||||
:class="linkClass"
|
||||
@click="click && click()"
|
||||
>
|
||||
{{ link }} →
|
||||
</NuxtLink>
|
||||
</Link>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
@@ -24,10 +25,12 @@
|
||||
|
||||
<script>
|
||||
import Icon from '../elements/Icon'
|
||||
import Link from '../elements/Link'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
Icon
|
||||
Icon,
|
||||
Link
|
||||
},
|
||||
props: {
|
||||
variant: {
|
||||
@@ -41,6 +44,10 @@ export default {
|
||||
type: [String, Object],
|
||||
default: null
|
||||
},
|
||||
click: {
|
||||
type: Function,
|
||||
default: null
|
||||
},
|
||||
title: {
|
||||
type: String,
|
||||
default: null
|
||||
|
||||
Reference in New Issue
Block a user