remove extra utils file

This commit is contained in:
Liam DeBeasi
2019-06-11 17:05:03 -04:00
parent aac60b1390
commit 64460b8efc
2 changed files with 29 additions and 30 deletions

View File

@ -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 === ''
);
};

View File

@ -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 === ''
);
};