Skip to content

Conversation

@wawhal
Copy link

@wawhal wawhal commented Mar 5, 2019

We are trying to integrate graphiql-explorer into Hasura GraphQL Engine console. We wish to override some CSS and are unable to do it because inline CSS has been used.

This PR adds a stylesheet in place of inline-CSS.

@robinweser
Copy link
Contributor

Seems reasonable! But, just FYI, you can always overwrite inline style using the element[style] selector :p

@wawhal
Copy link
Author

wawhal commented Mar 6, 2019

Sure @rofrischmann
Can we merge this if it LGTY?

@dwwoelfel
Copy link
Collaborator

I'd like to keep Explorer.js as a self-contained file.

@wawhal Can you modify this so that the component takes an optional styles map and merges those with the default styles?

You can leave the class names in place. Then if someone wants to override the styles with classes, they can still do that (you'd just have to pass a styles map that nulls out all of the styles).

@sgrove
Copy link
Contributor

sgrove commented May 30, 2019

We'll be shooting for style objects as a way of introducing theming, will close this and revisit once we have support for it!

@sgrove
Copy link
Contributor

sgrove commented Oct 4, 2019

@wawhal
Copy link
Author

wawhal commented Oct 4, 2019

@sgrove this is awesome! Solves all our problems. Thanks.
It is already being integrated in the Hasura console. You can track it here: hasura/graphql-engine#2994

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.

4 participants