mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-20 12:37:01 +02:00
* docs: add ToggleTags component for showcase * docs: add filter functionality * docs: remove redundant variables * docs: use react state for selectedTags * docs: add control to tag checkbox * docs: use useMemo for filteredUsers * docs: change names of tags * revert name tag changes * polish the showcase page * cleanup tags on the users list * minor polish * add querystring filtering * typo * Add title/arialabel to emulate tooltip Co-authored-by: Javid <singularity.javid@gmail.com> Co-authored-by: slorber <lorber.sebastien@gmail.com>
36 lines
751 B
JavaScript
36 lines
751 B
JavaScript
/**
|
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*/
|
|
|
|
import React from 'react';
|
|
import clsx from 'clsx';
|
|
|
|
import styles from './styles.module.css';
|
|
|
|
function ShowcaseCheckbox({
|
|
className,
|
|
name,
|
|
label,
|
|
onChange,
|
|
checked,
|
|
...props
|
|
}) {
|
|
const id = `showcase_checkbox_id_${name};`;
|
|
return (
|
|
<div className={clsx(props.className, styles.checkboxContainer)} {...props}>
|
|
<input
|
|
type="checkbox"
|
|
id={id}
|
|
name={name}
|
|
onChange={onChange}
|
|
checked={checked}
|
|
/>
|
|
<label htmlFor={id}>{label}</label>
|
|
</div>
|
|
);
|
|
}
|
|
|
|
export default ShowcaseCheckbox;
|