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

How to update styles of playground preview without overriding Playground component #1360

Closed
abdullahtariq1171 opened this issue Jan 14, 2020 · 6 comments

Comments

@abdullahtariq1171
Copy link

Question

How to update styles of playground preview without overriding Playground component.

Description
I want to customize playground styles, (this line in particular

)

@trybick
Copy link

trybick commented Jan 30, 2020

@abdullahtariq1171
Copy link
Author

lol... that's my comment 😊 glad it worked

@mickaelzhang
Copy link
Contributor

Not sure but you probably could shadow the styles.js file I guess?

import { preview as defaultPreview } from 'gatsby-theme-docz/src/components/Playground/styles'

export * from 'gatsby-theme-docz/src/components/Playground/styles.js'

export const editor = {
	...defaultPreview,
	padding: '100px',
}

@drewlustro
Copy link

+1 to use Theme UI for the Playground component

@mickaelzhang
Copy link
Contributor

@abdullahtariq1171 Has your question been answered?

@abdullahtariq1171
Copy link
Author

hey @mickaelzhang yeah your solution looks better than using global css selector. I discovered shadowing component technique late. Thanks

Solution: #1360 (comment)

Closing the issue.

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

No branches or pull requests

4 participants