Skip to content

Commit

Permalink
feat(alert): Handle link as button (#25)
Browse files Browse the repository at this point in the history
  • Loading branch information
larbish committed Jan 18, 2022
1 parent adbee9c commit b218737
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions src/runtime/components/feedback/Alert.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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 }} &rarr;
</NuxtLink>
</Link>
</p>
</div>
</div>
Expand All @@ -24,10 +25,12 @@

<script>
import Icon from '../elements/Icon'
import Link from '../elements/Link'
export default {
components: {
Icon
Icon,
Link
},
props: {
variant: {
Expand All @@ -41,6 +44,10 @@ export default {
type: [String, Object],
default: null
},
click: {
type: Function,
default: null
},
title: {
type: String,
default: null
Expand Down

1 comment on commit b218737

@vercel
Copy link

@vercel vercel bot commented on b218737 Jan 18, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

Please sign in to comment.