mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-20 04:14:21 +08:00
docs(all): improve type docs for event
This commit is contained in:

committed by
Manu MA

parent
b3316d480f
commit
3d656ac312
5
core/src/components/checkbox/checkbox-interface.ts
Normal file
5
core/src/components/checkbox/checkbox-interface.ts
Normal file
@ -0,0 +1,5 @@
|
||||
|
||||
export interface CheckboxChangeEventDetail {
|
||||
value: any;
|
||||
checked: boolean;
|
||||
}
|
@ -1,6 +1,6 @@
|
||||
import { Component, ComponentInterface, Element, Event, EventEmitter, Prop, State, Watch } from '@stencil/core';
|
||||
|
||||
import { CheckedInputChangeEvent, Color, Mode, StyleEvent } from '../../interface';
|
||||
import { CheckboxChangeEventDetail, Color, Mode, StyleEventDetail } from '../../interface';
|
||||
import { findItemLabel, renderHiddenInput } from '../../utils/helpers';
|
||||
import { createColorClasses, hostContext } from '../../utils/theme';
|
||||
|
||||
@ -59,7 +59,7 @@ export class Checkbox implements ComponentInterface {
|
||||
/**
|
||||
* Emitted when the checked property has changed.
|
||||
*/
|
||||
@Event() ionChange!: EventEmitter<CheckedInputChangeEvent>;
|
||||
@Event() ionChange!: EventEmitter<CheckboxChangeEventDetail>;
|
||||
|
||||
/**
|
||||
* Emitted when the toggle has focus.
|
||||
@ -75,7 +75,7 @@ export class Checkbox implements ComponentInterface {
|
||||
* Emitted when the styles change.
|
||||
* @internal
|
||||
*/
|
||||
@Event() ionStyle!: EventEmitter<StyleEvent>;
|
||||
@Event() ionStyle!: EventEmitter<StyleEventDetail>;
|
||||
|
||||
componentWillLoad() {
|
||||
this.emitStyle();
|
||||
|
@ -110,11 +110,11 @@ export class HomePage {
|
||||
|
||||
## Events
|
||||
|
||||
| Event | Description | Detail |
|
||||
| ----------- | ---------------------------------------------- | ----------------------- |
|
||||
| `ionBlur` | Emitted when the toggle loses focus. | void |
|
||||
| `ionChange` | Emitted when the checked property has changed. | CheckedInputChangeEvent |
|
||||
| `ionFocus` | Emitted when the toggle has focus. | void |
|
||||
| Event | Description | Type |
|
||||
| ----------- | ---------------------------------------------- | ---------------------------------------- |
|
||||
| `ionBlur` | Emitted when the toggle loses focus. | `CustomEvent<void>` |
|
||||
| `ionChange` | Emitted when the checked property has changed. | `CustomEvent<CheckboxChangeEventDetail>` |
|
||||
| `ionFocus` | Emitted when the toggle has focus. | `CustomEvent<void>` |
|
||||
|
||||
|
||||
## CSS Custom Properties
|
||||
|
Reference in New Issue
Block a user