Package Exports
- @scalar/use-toasts
- @scalar/use-toasts/dist/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@scalar/use-toasts) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Scalar useToasts()
Installation
npm install @scalar/use-toasts
Usage
// App.vue
<script setup>
import { ScalarToasts } from '@scalar/use-toasts'
</script>
<template>
<ScalarToasts />
</template>
// ChildComponent.vue
<script setup>
import { useToasts } from '@scalar/use-toasts'
const { toast } = useToasts()
const sendMessage = () => {
toast('This is a message from the toaster!', 'success', { timeout: 2000 })
}
</script>