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

Fix options layer bug #5524

Merged
merged 4 commits into from Aug 17, 2021
Merged

Conversation

britt6612
Copy link
Collaborator

What does this PR do?

This PR adds default values for both OptionsContext and RootsContext

Where should the reviewer start?

RootsContext.js
OptionsContext.js

What testing has been done on this PR?

Storybook

How should this be manually tested?

Take out <Grommet/> wrapper to ensure that Layer is still being rendered correctly

Any background context you want to provide?

There was no default value there was only undefined being passed through.
This default value can be helpful for testing components in isolation without wrapping them.
The default value needs to match what is being passed to the useContext for instance OptionsContext would expect an object so the default value needs to be an object

What are the relevant issues?

closes #5516

Screenshots (if appropriate)

Do the grommet docs need to be updated?

no

Should this PR be mentioned in the release notes?

no

Is this change backwards compatible or is it a breaking change?

backwards compatible

Copy link
Collaborator

@MikeKingdom MikeKingdom left a comment

Choose a reason for hiding this comment

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

Looks great. Thanks for doing this :)

Copy link
Collaborator

@taysea taysea left a comment

Choose a reason for hiding this comment

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

Looks good. Thank you!

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.

Layer breaks if it isn't include within a Grommet block
4 participants