Skip to content
This repository has been archived by the owner on Apr 6, 2023. It is now read-only.

Commit

Permalink
feat(nuxt): add default slot to <NuxtLoadingIndicator> (#7128)
Browse files Browse the repository at this point in the history
Co-authored-by: Alexander Lichter <github@lichter.io>
  • Loading branch information
daniil4udo and manniL committed Oct 10, 2022
1 parent e94c3b3 commit 75f4a54
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions docs/content/3.api/2.components/4.nuxt-loading-indicator.md
Expand Up @@ -19,6 +19,10 @@ Add `<NuxtLoadingIndicator/>` in your `app.vue` or layouts.

:button-link[Open on StackBlitz]{href="https://stackblitz.com/github/nuxt/framework/tree/main/examples/routing/pages?terminal=dev&file=/app.vue" blank}

## Slots

You can pass custom HTML or components through the loading indicator's default slot.

## Props

- **color**: The color of the loading bar.
Expand Down
4 changes: 2 additions & 2 deletions packages/nuxt/src/app/components/nuxt-loading-indicator.ts
Expand Up @@ -21,7 +21,7 @@ export default defineComponent({
default: 'repeating-linear-gradient(to right,#00dc82 0%,#34cdfe 50%,#0047e1 100%)'
}
},
setup (props) {
setup (props, { slots }) {
const indicator = useLoadingIndicator({
duration: props.duration,
throttle: props.throttle
Expand Down Expand Up @@ -50,7 +50,7 @@ export default defineComponent({
transition: 'width 0.1s, height 0.4s, opacity 0.4s',
zIndex: 999999
}
})
}, slots)
}
})

Expand Down

0 comments on commit 75f4a54

Please sign in to comment.