PluginProbe
ElasticPress / 4.2.2
ElasticPress v4.2.2
5.3.5 5.3.4 3.6.5 3.6.6 4.0.0 4.0.1 4.1.0 4.2.0 4.2.1 4.2.2 4.3.0 4.3.1 4.4.0 4.4.1 4.5.0 4.5.1 4.5.2 4.6.0 4.6.1 4.7.0 4.7.1 4.7.2 5.0.0 5.0.1 5.0.2 All 108 releases
elasticpress / assets / js / instant-results / components / common / checkbox.js

checkbox.js in ElasticPress 4.2.2, at assets/js/instant-results/components/common/checkbox.js

26 lines 715 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 /**
2 * WordPress dependencies.
3 */
4 import { WPElement } from '@wordpress/element';
5
6 /**
7 * Checkbox component.
8 *
9 * @param {Option} props Component props.
10 * @param {string} props.count Checkbox count.
11 * @param {string} props.id Checkbox ID.
12 * @param {string} props.label Checkbox label.
13 *
14 * @returns {WPElement} Component element.
15 */
16 export default ({ count, id, label, ...props }) => {
17 return (
18 <div className="ep-search-checkbox">
19 <input className="ep-search-checkbox__input" id={id} type="checkbox" {...props} />{' '}
20 <label className="ep-search-checkbox__label" htmlFor={id}>
21 {label} {count && <span className="ep-search-checkbox__count">{count}</span>}
22 </label>
23 </div>
24 );
25 };
26