Skip to content

Commit

Permalink
fix(text-field-search): make className and endOfAccessory optional
Browse files Browse the repository at this point in the history
  • Loading branch information
legobeat committed Oct 10, 2024
1 parent 0a7732b commit eeaf068
Showing 1 changed file with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ import { useI18nContext } from '../../../../hooks/useI18nContext';
*/

export const TextFieldSearch = ({
className,
className = '',
showClearButton = true, // only works with a controlled input
clearButtonOnClick,
clearButtonProps,
endAccessory,
endAccessory = null,
inputProps,
value,
onChange,
Expand Down Expand Up @@ -108,11 +108,16 @@ TextFieldSearch.propTypes = {
/**
* Component to appear on the right side of the input
*/
endAccessory: PropTypes.node,
endAccessory: PropTypes.oneOfType([PropTypes.node, PropTypes.any]),
/**
* Attributes applied to the `input` element.
*/
inputProps: PropTypes.object,
};

TextFieldSearch.defaultProps = {
className: '',
endAccessory: null,
};

TextFieldSearch.displayName = 'TextFieldSearch';

0 comments on commit eeaf068

Please sign in to comment.