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

Adding a <Panel/> component #1881

Closed
mthuret opened this issue Jan 19, 2017 · 1 comment
Closed

Adding a <Panel/> component #1881

mthuret opened this issue Jan 19, 2017 · 1 comment
Assignees

Comments

@mthuret
Copy link
Contributor

mthuret commented Jan 19, 2017

Use case:

You want to add a title to a refinement list and want to be able to hide it when there's no refinement to display.

Api:

Having a <Panel/> component accepting a prop title. When the encapsulated widget has no refinement to display, then we will add a class at the panel level.

Usage:

<Panel title="category">
    <RefinementList attributeName="category"/>
</Panel>

Possible Implementation:

The <Panel/> could pass to its child a function expecting a boolean. It will be the responsibility of the children to call it when needed, for example, when it is unmounted.

Identified Widgets:

  • CurrentRefinements
  • HierarchicalMenu
  • Menu
  • RangeInput
  • RefinementList
  • StarRating
  • MultiRange
@vvo
Copy link
Contributor

vvo commented Jan 19, 2017

👍 I wonder how the implementation could look like, good luck!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants