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

Extract FilterFormModal #22

Open
hextraza opened this issue Aug 6, 2024 · 0 comments
Open

Extract FilterFormModal #22

hextraza opened this issue Aug 6, 2024 · 0 comments

Comments

@hextraza
Copy link
Contributor

hextraza commented Aug 6, 2024

FilterFormModal is pretty close to a generic Modal component that we could use to render any subcomponent, so I think we should extend it slightly so it can be used in more ways than it is at the moment. Extract it to discvr-components and rename it to PaperModal. It should take a "title" prop instead of having the set title "Filters" in the Typography component. It should also take a prop for the subcomponent instead of hard-coding a FilterForm as its child. Rename "filterProps" to "childComponentProps" as well.

What we should end up with is the ability to call PaperModal, specify a title and a subcomponent, and pass that subcomponent arbitrary props. open and handleClose can remain the same.

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

1 participant