mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-09 08:09:32 +08:00
remove extra utils file
This commit is contained in:
@ -5,8 +5,6 @@ import { debounceEvent } from '../../utils/helpers';
|
|||||||
import { sanitizeDOMString } from '../../utils/sanitization';
|
import { sanitizeDOMString } from '../../utils/sanitization';
|
||||||
import { createColorClasses } from '../../utils/theme';
|
import { createColorClasses } from '../../utils/theme';
|
||||||
|
|
||||||
import { isCancelButtonSetToFocus, isCancelButtonSetToNever } from './searchbar.utils';
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
tag: 'ion-searchbar',
|
tag: 'ion-searchbar',
|
||||||
styleUrls: {
|
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 === ''
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|||||||
@ -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 === ''
|
|
||||||
);
|
|
||||||
};
|
|
||||||
Reference in New Issue
Block a user