Co-authored-by: Nick Taylor <nick@iamdeveloper.com> Co-authored-by: Ridhwana <Ridhwana.Khan16@gmail.com>
20 lines
394 B
JavaScript
20 lines
394 B
JavaScript
import { h } from 'preact';
|
||
import PropTypes from 'prop-types';
|
||
|
||
const ClearQueryButton = ({ onClick }) => (
|
||
<button
|
||
data-testid="clear-query-button"
|
||
type="button"
|
||
className="listing-search-clear"
|
||
onClick={onClick}
|
||
id="clear-query-button"
|
||
>
|
||
×
|
||
</button>
|
||
);
|
||
|
||
ClearQueryButton.propTypes = {
|
||
onClick: PropTypes.func.isRequired,
|
||
};
|
||
|
||
export default ClearQueryButton;
|