mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-30 03:38:54 +01:00
feat(alert): Handle link as button (#25)
This commit is contained in:
@@ -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 }} →
|
{{ link }} →
|
||||||
</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
|
||||||
|
|||||||
Reference in New Issue
Block a user