diff --git a/core/src/components/searchbar/searchbar.tsx b/core/src/components/searchbar/searchbar.tsx index 2667519e0e..f421e6caaa 100644 --- a/core/src/components/searchbar/searchbar.tsx +++ b/core/src/components/searchbar/searchbar.tsx @@ -5,8 +5,6 @@ import { debounceEvent } from '../../utils/helpers'; import { sanitizeDOMString } from '../../utils/sanitization'; import { createColorClasses } from '../../utils/theme'; -import { isCancelButtonSetToFocus, isCancelButtonSetToNever } from './searchbar.utils'; - @Component({ tag: 'ion-searchbar', styleUrls: { @@ -466,3 +464,32 @@ export class Searchbar implements ComponentInterface { ]; } } + +/** + * Check if the cancel button should never be shown. + * + * TODO: Remove this when the `true` and `false` + * options are removed. + */ +const isCancelButtonSetToNever = (showCancelButton: boolean | string): boolean => { + return ( + showCancelButton === 'never' || + showCancelButton === 'false' || + showCancelButton === false + ); +}; + +/** + * Check if the cancel button should be shown on focus. + * + * TODO: Remove this when the `true` and `false` + * options are removed. + */ +const isCancelButtonSetToFocus = (showCancelButton: boolean | string): boolean => { + return ( + showCancelButton === 'focus' || + showCancelButton === 'true' || + showCancelButton === true || + showCancelButton === '' + ); +}; diff --git a/core/src/components/searchbar/searchbar.utils.ts b/core/src/components/searchbar/searchbar.utils.ts deleted file mode 100644 index cb6ae61775..0000000000 --- a/core/src/components/searchbar/searchbar.utils.ts +++ /dev/null @@ -1,28 +0,0 @@ -/** - * Check if the cancel button should never be shown. - * - * TODO: Remove this when the `true` and `false` - * options are removed. - */ -export const isCancelButtonSetToNever = (showCancelButton: boolean | string): boolean => { - return ( - showCancelButton === 'never' || - showCancelButton === 'false' || - showCancelButton === false - ); -}; - -/** - * Check if the cancel button should be shown on focus. - * - * TODO: Remove this when the `true` and `false` - * options are removed. - */ -export const isCancelButtonSetToFocus = (showCancelButton: boolean | string): boolean => { - return ( - showCancelButton === 'focus' || - showCancelButton === 'true' || - showCancelButton === true || - showCancelButton === '' - ); -};