mirror of
https://github.com/hiaaryan/sileo.git
synced 2026-04-26 23:45:50 +03:00
[PR #27] [CLOSED] feat: add optional Sonner-compatible API wrapper #29
Labels
No labels
bug
enhancement
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/sileo#29
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/hiaaryan/sileo/pull/27
Author: @lubauss
Created: 2/21/2026
Status: ❌ Closed
Base:
main← Head:feat/sonner-compat📝 Commits (1)
064e9c4feat: add optional Sonner-compatible API wrapper📊 Changes
2 files changed (+60 additions, -0 deletions)
View changed files
➕
src/compat.ts(+58 -0)📝
src/index.ts(+2 -0)📄 Description
Summary
Add an optional
toastexport that provides a Sonner-compatible API, making migration from Sonner to Sileo a simple import change.Problem
Sileo uses a different API shape than Sonner:
Projects migrating from Sonner need to rewrite every toast call.
Solution
New
src/compat.tsproviding a callabletoastwith method variants:Option Mapping
titleopts.descriptiondescriptionopts.durationduration(Infinity→nullfor sticky toasts)opts.action.label/onClickbutton.title/onClickopts.ididFiles Changed
src/compat.tssrc/index.tstoastfrom compat, exportSileoToasterPropstypeBackward Compatibility
sileoAPItoastis a new named export alongside the existingsileoexportTesting
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.