toss / overlay-kit

The simplest and most intuitive way to manage overlays in React.
https://overlay-kit.slash.page
MIT License
295 stars 30 forks source link

feat: Add overlayAsync implementation #59

Closed XionWCFM closed 4 months ago

XionWCFM commented 4 months ago

Description

This change implements the openAsync method for overly-kit's promise support discussed in #47.

Related Issue: Fixes #47

Changes

Motivation and Context

Although overlay-kit emphasizes support for promises in its documentation, there was a problem with boilerplate due to the lack of explicit support for promises.

To address this issue, we add openAsync explicit support for promises.

How Has This Been Tested?

I tested through test code that the parameters passed to openAsync's close method return resolved values, and that the close method properly closes the overlay on the screen.

Types of changes

Checklist

Further Comments

changeset-bot[bot] commented 4 months ago

🦋 Changeset detected

Latest commit: e91db6231acaa3566435b5fdffb4f3b456368a76

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages | Name | Type | | -------------------------- | ----- | | overlay-kit | Minor | | @overlay-kit/framer-motion | Patch |

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

vercel[bot] commented 4 months ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
overlay-kit ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 15, 2024 5:50am