chore(): simplify overlay attribute types (#25074)

This commit is contained in:
Liam DeBeasi
2022-04-07 14:11:30 -04:00
committed by GitHub
parent 1c26e9b9b0
commit 9fbaaf95eb
20 changed files with 221 additions and 245 deletions

View File

@@ -1,5 +1,3 @@
import type { JSXBase } from '@stencil/core/internal';
import type { AnimationBuilder, Mode, SpinnerTypes } from '../../interface';
import type { IonicSafeString } from '../../utils/sanitization';
@@ -21,4 +19,7 @@ export interface LoadingOptions {
leaveAnimation?: AnimationBuilder;
}
export type LoadingAttributes = JSXBase.HTMLAttributes<HTMLElement>;
/**
* @deprecated - Use { [key: string]: any } directly instead.
*/
export type LoadingAttributes = { [key: string]: any };

View File

@@ -54,18 +54,13 @@ interface LoadingOptions {
mode?: Mode;
keyboardClose?: boolean;
id?: string;
htmlAttributes?: LoadingAttributes;
htmlAttributes?: { [key: string]: any };
enterAnimation?: AnimationBuilder;
leaveAnimation?: AnimationBuilder;
}
```
### LoadingAttributes
```typescript
interface LoadingAttributes extends JSXBase.HTMLAttributes<HTMLElement> {}
```
<!-- Auto Generated Below -->
@@ -380,7 +375,7 @@ export default defineComponent({
| `cssClass` | `css-class` | Additional classes to apply for custom CSS. If multiple classes are provided they should be separated by spaces. | `string \| string[] \| undefined` | `undefined` |
| `duration` | `duration` | Number of milliseconds to wait before dismissing the loading indicator. | `number` | `0` |
| `enterAnimation` | -- | Animation to use when the loading indicator is presented. | `((baseEl: any, opts?: any) => Animation) \| undefined` | `undefined` |
| `htmlAttributes` | -- | Additional attributes to pass to the loader. | `LoadingAttributes \| undefined` | `undefined` |
| `htmlAttributes` | -- | Additional attributes to pass to the loader. | `undefined \| { [key: string]: any; }` | `undefined` |
| `keyboardClose` | `keyboard-close` | If `true`, the keyboard will be automatically dismissed when the overlay is presented. | `boolean` | `true` |
| `leaveAnimation` | -- | Animation to use when the loading indicator is dismissed. | `((baseEl: any, opts?: any) => Animation) \| undefined` | `undefined` |
| `message` | `message` | Optional text content to display in the loading indicator. | `IonicSafeString \| string \| undefined` | `undefined` |