File size: 1,404 Bytes
1e92f2d |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
import Panel from '../components/Panel';
/**
* The Panel widget wraps other widgets in a consistent panel design.
* It also reacts, indicates and set CSS classes when widgets are no more relevant for refining.
* E.g. when a RefinementList becomes empty because of the current search results.
*
* @name Panel
* @kind widget
* @propType {string} [className] - Adds a className on the root element.
* @propType {node} [header] - Adds a header to the widget.
* @propType {node} [footer] - Adds a footer to the widget.
* @themeKey ais-Panel - the root div of the Panel
* @themeKey ais-Panel--noRefinement - the root div of the Panel without refinement
* @themeKey ais-Panel-header - the header of the Panel (optional)
* @themeKey ais-Panel-body - the body of the Panel
* @themeKey ais-Panel-footer - the footer of the Panel (optional)
* @example
* import React from 'react';
* import algoliasearch from 'algoliasearch/lite';
* import { InstantSearch, Panel, RefinementList } from 'react-instantsearch-dom';
*
* const searchClient = algoliasearch(
* 'latency',
* '6be0576ff61c053d5f9a3225e2a90f76'
* );
*
* const App = () => (
* <InstantSearch
* searchClient={searchClient}
* indexName="instant_search"
* >
* <Panel header="Categories">
* <RefinementList attribute="categories" />
* </Panel>
* </InstantSearch>
* );
*/
export default Panel;
|