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

- add isDark for MediaQuery #358

Merged
merged 4 commits into from
Jan 10, 2025
Merged

- add isDark for MediaQuery #358

merged 4 commits into from
Jan 10, 2025

Conversation

alexandrim0
Copy link
Contributor

Description

Adds parameter for MediaQuery defining dark theme.
Also follows suggestion of linter.

Type of Change

  • ✨ New feature or improvement
  • 🗑️ Chore

Ready Checklist

  • I've read the Contribution Guide.
  • In case this PR changes one of the core packages, I've modified the respective CHANGELOG.md file using
    the semantic_changelog format.
  • I updated/added relevant documentation (doc comments with ///).
  • I added myself to the AUTHORS file (optional, if you want to).

@alexandrim0 alexandrim0 requested a review from schultek as a code owner January 2, 2025 17:08
Copy link

docs-page bot commented Jan 2, 2025

To view this pull requests documentation preview, visit the following URL:

docs.page/schultek/jaspr~358

Documentation is deployed and generated using docs.page.

Copy link

github-actions bot commented Jan 2, 2025

Package Version Report

The following packages have been updated:
jaspr : 0.16.4 -> 0.16.5
jaspr_builder : 0.16.4 -> 0.16.5
jaspr_cli : 0.16.4 -> 0.16.5
jaspr_test : 0.16.4 -> 0.16.5

Copy link
Owner

@schultek schultek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice addition, though I would use a ColorScheme enum and keep the prefersColorScheme parameter name. Then its easier to reason about what it does.

Also make sure to add the parameter to the MediaQuery constructors, they are missing there.

And add something to the changelog, e.g.:

## Unreleased patch

- Added `prefersColorScheme` parameter to `MediaQuery`.

@alexandrim0
Copy link
Contributor Author

Hi!

I`ve changed parameter type and name as suggested.
But I did not add it to change log to prevent conflict.
I hope it wont be a trouble.

Thank you!

Copy link
Owner

@schultek schultek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for the contribution

@schultek schultek merged commit b753609 into schultek:main Jan 10, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants