docbrown/app/javascript/listings/components/ClearQueryButton.jsx
Katie Davis 76453b41fb
Updates ESLint rules to error on default imports (#12512)
* add rule

* add named imports

* more missed files

* so many files
2021-02-02 10:24:03 -05:00

19 lines
414 B
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import { h } from 'preact';
import PropTypes from 'prop-types';
import { Button } from '@crayons/Button/Button';
export const ClearQueryButton = ({ onClick }) => (
<Button
data-testid="clear-query-button"
variant="ghost"
className="absolute right-0"
onClick={onClick}
id="clear-query-button"
>
×
</Button>
);
ClearQueryButton.propTypes = {
onClick: PropTypes.func.isRequired,
};