Skip to content

Commit

Permalink
docs(menu-toggle): default behaviour docs
Browse files Browse the repository at this point in the history
fixes #15042
  • Loading branch information
manucorporat committed Aug 7, 2018
1 parent 2c191d7 commit 4e56592
Show file tree
Hide file tree
Showing 10 changed files with 73 additions and 32 deletions.
13 changes: 8 additions & 5 deletions core/src/components.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1305,11 +1305,11 @@ declare global {

interface IonMenuToggle {
/**
* Automatically hides the content when the corresponding menu is not active
* Automatically hides the content when the corresponding menu is not active. By default, it's `true`. Change it to `false` in order to keep `ion-menu-toggle` always visible regardless the state of the menu.
*/
'autoHide': boolean;
/**
* Optional property that maps to a Menu's `menuId` prop. Can also be `left` or `right` for the menu side. This is used to find the correct menu to toggle
* Optional property that maps to a Menu's `menuId` prop. Can also be `start` or `end` for the menu side. This is used to find the correct menu to toggle. If this property is not used, `ion-menu-toggle` will toggle the first menu that is active.
*/
'menu': string;
}
Expand Down Expand Up @@ -4285,7 +4285,7 @@ declare global {
*/
'onIonCancel'?: (event: CustomEvent<void>) => void;
/**
* Emitted when the checked property has changed.
* Emitted when the value (selected date) has changed.
*/
'onIonChange'?: (event: CustomEvent<void>) => void;
/**
Expand Down Expand Up @@ -4862,11 +4862,11 @@ declare global {

export interface IonMenuToggleAttributes extends HTMLAttributes {
/**
* Automatically hides the content when the corresponding menu is not active
* Automatically hides the content when the corresponding menu is not active. By default, it's `true`. Change it to `false` in order to keep `ion-menu-toggle` always visible regardless the state of the menu.
*/
'autoHide'?: boolean;
/**
* Optional property that maps to a Menu's `menuId` prop. Can also be `left` or `right` for the menu side. This is used to find the correct menu to toggle
* Optional property that maps to a Menu's `menuId` prop. Can also be `start` or `end` for the menu side. This is used to find the correct menu to toggle. If this property is not used, `ion-menu-toggle` will toggle the first menu that is active.
*/
'menu'?: string;
}
Expand Down Expand Up @@ -5051,6 +5051,9 @@ declare global {

export interface IonPickerColumnAttributes extends HTMLAttributes {
'col'?: PickerColumn;
/**
* Emitted when the selected option has changed.
*/
'onIonChange'?: (event: CustomEvent<void>) => void;
}

Expand Down
16 changes: 16 additions & 0 deletions core/src/components/chip-icon/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,14 @@ The icon to use.
Possible values are the same as `"ion-icon"`.


#### src

string

The icon src to use.
Possible values are the same as `"ion-icon"`.


## Attributes

#### color
Expand Down Expand Up @@ -59,6 +67,14 @@ The icon to use.
Possible values are the same as `"ion-icon"`.


#### src

string

The icon src to use.
Possible values are the same as `"ion-icon"`.



----------------------------------------------

Expand Down
2 changes: 1 addition & 1 deletion core/src/components/datetime/datetime.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ export class Datetime {
@Event() ionCancel!: EventEmitter<void>;

/**
* Emitted when the checked property has changed.
* Emitted when the value (selected date) has changed.
*/
@Event() ionChange!: EventEmitter<void>;

Expand Down
5 changes: 5 additions & 0 deletions core/src/components/datetime/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -571,6 +571,11 @@ recent leap years, then this input's value would be `yearValues="2024,2020,2016,
Emitted when the datetime selection was cancelled.


#### ionChange

Emitted when the value (selected date) has changed.


#### ionStyle

Emitted when the styles change.
Expand Down
12 changes: 9 additions & 3 deletions core/src/components/menu-toggle/menu-toggle.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,19 @@ export class MenuToggle {

/**
* Optional property that maps to a Menu's `menuId` prop.
* Can also be `left` or `right` for the menu side.
* This is used to find the correct menu to toggle
* Can also be `start` or `end` for the menu side.
* This is used to find the correct menu to toggle.
*
* If this property is not used, `ion-menu-toggle` will toggle the
* first menu that is active.
*/
@Prop() menu?: string;

/**
* Automatically hides the content when the corresponding menu is not active
* Automatically hides the content when the corresponding menu is not active.
*
* By default, it's `true`. Change it to `false` in order to
* keep `ion-menu-toggle` always visible regardless the state of the menu.
*/
@Prop() autoHide = true;

Expand Down
28 changes: 22 additions & 6 deletions core/src/components/menu-toggle/readme.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# ion-menu-toggle

The MenuToggle component can be used to toggle a menu open or closed.

By default, it's only visible when the selected menu is active. A menu is active when it can be opened/closed. If the menu is disabled or it's being presented as a split-pane, the menu is marked as non-active and ion-menu-toggle hides itself.

In case it's desired to keep `ion-menu-toggle` always visible, the `autoHide` property can be set to `false`.

<!-- Auto Generated Below -->

Expand All @@ -11,16 +15,22 @@ The MenuToggle component can be used to toggle a menu open or closed.

boolean

Automatically hides the content when the corresponding menu is not active
Automatically hides the content when the corresponding menu is not active.

By default, it's `true`. Change it to `false` in order to
keep `ion-menu-toggle` always visible regardless the state of the menu.


#### menu

string

Optional property that maps to a Menu's `menuId` prop.
Can also be `left` or `right` for the menu side.
This is used to find the correct menu to toggle
Can also be `start` or `end` for the menu side.
This is used to find the correct menu to toggle.

If this property is not used, `ion-menu-toggle` will toggle the
first menu that is active.


## Attributes
Expand All @@ -29,16 +39,22 @@ This is used to find the correct menu to toggle

boolean

Automatically hides the content when the corresponding menu is not active
Automatically hides the content when the corresponding menu is not active.

By default, it's `true`. Change it to `false` in order to
keep `ion-menu-toggle` always visible regardless the state of the menu.


#### menu

string

Optional property that maps to a Menu's `menuId` prop.
Can also be `left` or `right` for the menu side.
This is used to find the correct menu to toggle
Can also be `start` or `end` for the menu side.
This is used to find the correct menu to toggle.

If this property is not used, `ion-menu-toggle` will toggle the
first menu that is active.



Expand Down
3 changes: 3 additions & 0 deletions core/src/components/picker-column/picker-column.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ export class PickerColumnCmp {

@Prop() col!: PickerColumn;

/**
* Emitted when the selected option has changed.
*/
@Event() ionChange!: EventEmitter<void>;

componentWillLoad() {
Expand Down
7 changes: 7 additions & 0 deletions core/src/components/picker-column/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,13 @@ PickerColumn



## Events

#### ionChange

Emitted when the selected option has changed.



----------------------------------------------

Expand Down
15 changes: 0 additions & 15 deletions core/src/components/picker/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -197,16 +197,6 @@ Emitted before the picker has presented.

## Methods

#### addButton()

Add a new PickerButton to the picker


#### addColumn()

Add a new PickerColumn to the picker


#### dismiss()

Dismiss the picker overlay after it has been presented.
Expand All @@ -217,11 +207,6 @@ Dismiss the picker overlay after it has been presented.
Returns the column the matches the specified name


#### getColumns()

Returns all the PickerColumns


#### onDidDismiss()

Returns a promise that resolves when the picker did dismiss. It also accepts a callback
Expand Down
4 changes: 2 additions & 2 deletions core/src/components/range/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ Specifies the value granularity. Defaults to `1`.

#### value

any
number

the value of the range.

Expand Down Expand Up @@ -194,7 +194,7 @@ Specifies the value granularity. Defaults to `1`.

#### value

any
number

the value of the range.

Expand Down

0 comments on commit 4e56592

Please sign in to comment.