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 214 additions and 238 deletions

View File

@ -1,5 +1,3 @@
import type { JSXBase } from '@stencil/core/internal';
import type { AnimationBuilder, Mode } from '../../interface';
export interface ActionSheetOptions {
@ -19,7 +17,10 @@ export interface ActionSheetOptions {
leaveAnimation?: AnimationBuilder;
}
export type ActionSheetAttributes = JSXBase.HTMLAttributes<HTMLElement>;
/**
* @deprecated - Use { [key: string]: any } directly instead.
*/
export type ActionSheetAttributes = { [key: string]: any };
export interface ActionSheetButton<T = any> {
text?: string;

View File

@ -65,19 +65,13 @@ interface ActionSheetOptions {
mode?: Mode;
keyboardClose?: boolean;
id?: string;
htmlAttributes?: ActionSheetAttributes;
htmlAttributes?: { [key: string]: any };
enterAnimation?: AnimationBuilder;
leaveAnimation?: AnimationBuilder;
}
```
### ActionSheetAttributes
```typescript
interface ActionSheetAttributes extends JSXBase.HTMLAttributes<HTMLElement> {}
```
<!-- Auto Generated Below -->
@ -569,7 +563,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` |
| `enterAnimation` | -- | Animation to use when the action sheet is presented. | `((baseEl: any, opts?: any) => Animation) \| undefined` | `undefined` |
| `header` | `header` | Title for the action sheet. | `string \| undefined` | `undefined` |
| `htmlAttributes` | -- | Additional attributes to pass to the action sheet. | `ActionSheetAttributes \| undefined` | `undefined` |
| `htmlAttributes` | -- | Additional attributes to pass to the action sheet. | `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 action sheet is dismissed. | `((baseEl: any, opts?: any) => Animation) \| undefined` | `undefined` |
| `mode` | `mode` | The mode determines which platform styles to use. | `"ios" \| "md"` | `undefined` |