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

Provides a default value to the drawer #271

Merged
merged 2 commits into from
Apr 15, 2023

Conversation

erikyo
Copy link
Collaborator

@erikyo erikyo commented Apr 14, 2023

What?

the Drawer component requires some mandatory props

Why?

We can set a default value to be able to call the components without adding any arguments, so it will be easier to import

How?

adding the default values like

const NotificationHub = ( {
	active = false,
	initialActive = false,
} ) => {'...'}

@erikyo erikyo requested a review from johnhooks April 14, 2023 22:53
Copy link
Collaborator

@johnhooks johnhooks left a comment

Choose a reason for hiding this comment

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

LGTM. If we want to use the other hook we need to find a better way to import it.

@erikyo erikyo merged commit 4f33b55 into WordPress:develop Apr 15, 2023
@erikyo erikyo deleted the fix/hub-default-values branch April 15, 2023 00:46
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