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 defaultTheme prop to specify default theme if no previous value stored #3619

Merged
merged 3 commits into from
Aug 15, 2024

Conversation

Yahkob
Copy link
Contributor

@Yahkob Yahkob commented May 29, 2024

I'm not sure if this is too big of a change but would love to have a way to provide an optional prop to show GraphiQL in a specific theme.

Copy link

changeset-bot bot commented May 29, 2024

🦋 Changeset detected

Latest commit: 238edcd

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

This PR includes changesets to release 4 packages
Name Type
@graphiql/react Minor
graphiql Minor
@graphiql/plugin-code-exporter Major
@graphiql/plugin-explorer Major

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

Copy link

linux-foundation-easycla bot commented May 29, 2024

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: dimaMachina / name: Dimitri POSTOLOV (de776da, 238edcd)
  • ✅ login: Yahkob / name: Jake Harclerode (4299163)

Copy link

codecov bot commented Jun 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 67.29%. Comparing base (959ed21) to head (238edcd).
Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #3619   +/-   ##
=======================================
  Coverage   67.29%   67.29%           
=======================================
  Files         121      121           
  Lines        7017     7017           
  Branches     2268     2244   -24     
=======================================
  Hits         4722     4722           
  Misses       2278     2278           
  Partials       17       17           
Files Coverage Δ
packages/graphiql-react/src/theme.ts 59.25% <100.00%> (ø)
packages/graphiql/src/components/GraphiQL.tsx 78.41% <100.00%> (ø)

Copy link
Collaborator

@dimaMachina dimaMachina left a comment

Choose a reason for hiding this comment

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

thanks, lgtm, added some e2e tests, maybe in some major we could migrate to next-themes and avoid creating wheel

@dimaMachina dimaMachina merged commit 9aef83a into graphql:main Aug 15, 2024
12 checks passed
This was referenced Aug 15, 2024
dimaMachina added a commit that referenced this pull request Aug 15, 2024
…tored (#3619)

* add defaultTheme prop to specify default theme if no previous value in storageContext

* yoyo

---------

Co-authored-by: Dimitri POSTOLOV <[email protected]>
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