Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Close app with use_platform #613

Merged
merged 2 commits into from
May 17, 2024
Merged

Conversation

marc2332
Copy link
Owner

@marc2332 marc2332 commented May 14, 2024

Closes #612
Example:

fn app() -> Element {
    let platform = use_platform();

    rsx!(
        Button {
            onclick: move |_| platform.exit(),
            label { "Close" }
        }
    )
}

Copy link

codecov bot commented May 14, 2024

Codecov Report

Attention: Patch coverage is 0% with 6 lines in your changes are missing coverage. Please review.

Project coverage is 73.26%. Comparing base (885959c) to head (c1a1bcf).
Report is 1 commits behind head on main.

Current head c1a1bcf differs from pull request most recent head 36a1b0f

Please upload reports for the commit 36a1b0f to get more accurate results.

Files Patch % Lines
crates/hooks/src/use_platform.rs 0.00% 3 Missing ⚠️
crates/renderer/src/event_loop.rs 0.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #613      +/-   ##
==========================================
- Coverage   73.29%   73.26%   -0.03%     
==========================================
  Files         192      192              
  Lines       19177    19183       +6     
==========================================
  Hits        14055    14055              
- Misses       5122     5128       +6     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@marc2332 marc2332 marked this pull request as ready for review May 15, 2024 19:23
@marc2332 marc2332 merged commit fe0b750 into main May 17, 2024
4 of 6 checks passed
@marc2332 marc2332 deleted the feat/close-app-with-use_platform branch May 17, 2024 21:37
@github-actions github-actions bot mentioned this pull request May 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement 🔥 New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

enhancement: Close Window API
1 participant