Toast usage
Projection UI 0.1.5 archive
You are reading version 0.1.5. This archive retains its original API and installation requirements. Open the current alpha documentation.
import { useToastStore } from '@hannasage/projection-ui'
function MyComponent() {
const toast = useToastStore(s => s.push)
return (
<button onClick={() => toast('Saved!', 'success')}>
Save
</button>
)
}Variants: info | success | warning | danger