docs(all): possible values are extracted by stencil (#16190)

* docs(all): possible values are extracted by stencil

* add defaults

* remove all hardcoded defaults

* update stencil
This commit is contained in:
Manu MA
2018-11-02 00:06:40 +01:00
committed by GitHub
parent 335acf96ee
commit ecc2c55370
151 changed files with 1363 additions and 1430 deletions

View File

@ -28,18 +28,16 @@ export class Button implements ComponentInterface {
/**
* The mode determines which platform styles to use.
* Possible values are: `"ios"` or `"md"`.
*/
@Prop() mode!: Mode;
/**
* The type of button.
* Possible values are: `"button"`, `"bar-button"`.
*/
@Prop({ mutable: true }) buttonType = 'button';
/**
* If `true`, the user cannot interact with the button. Defaults to `false`.
* If `true`, the user cannot interact with the button.
*/
@Prop({ reflectToAttr: true }) disabled = false;
@ -70,13 +68,11 @@ export class Button implements ComponentInterface {
/**
* The button shape.
* Possible values are: `"round"`.
*/
@Prop({ reflectToAttr: true }) shape?: 'round';
/**
* The button size.
* Possible values are: `"small"`, `"default"`, `"large"`.
*/
@Prop({ reflectToAttr: true }) size?: 'small' | 'default' | 'large';
@ -87,8 +83,6 @@ export class Button implements ComponentInterface {
/**
* The type of the button.
* Possible values are: `"submit"`, `"reset"` and `"button"`.
* Default value is: `"button"`
*/
@Prop() type: 'submit' | 'reset' | 'button' = 'button';

View File

@ -37,28 +37,28 @@ This attribute specifies the size of the button. Setting this attribute will cha
## Properties
| Property | Attribute | Description | Type |
| ----------------- | ------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------- |
| `buttonType` | `button-type` | The type of button. Possible values are: `"button"`, `"bar-button"`. | `string` |
| `color` | `color` | The color to use from your application's color palette. Default options are: `"primary"`, `"secondary"`, `"tertiary"`, `"success"`, `"warning"`, `"danger"`, `"light"`, `"medium"`, and `"dark"`. For more information on colors, see [theming](/docs/theming/basics). | `string \| undefined` |
| `disabled` | `disabled` | If `true`, the user cannot interact with the button. Defaults to `false`. | `boolean` |
| `expand` | `expand` | Set to `"block"` for a full-width button or to `"full"` for a full-width button without left and right borders. | `"block" \| "full" \| undefined` |
| `fill` | `fill` | Set to `"clear"` for a transparent button, to `"outline"` for a transparent button with a border, or to `"solid"`. The default style is `"solid"` except inside of a toolbar, where the default is `"clear"`. | `"clear" \| "default" \| "outline" \| "solid" \| undefined` |
| `href` | `href` | Contains a URL or a URL fragment that the hyperlink points to. If this property is set, an anchor tag will be rendered. | `string \| undefined` |
| `mode` | `mode` | The mode determines which platform styles to use. Possible values are: `"ios"` or `"md"`. | `"ios" \| "md"` |
| `routerDirection` | `router-direction` | When using a router, it specifies the transition direction when navigating to another page using `href`. | `"back" \| "forward" \| "root" \| undefined` |
| `shape` | `shape` | The button shape. Possible values are: `"round"`. | `"round" \| undefined` |
| `size` | `size` | The button size. Possible values are: `"small"`, `"default"`, `"large"`. | `"default" \| "large" \| "small" \| undefined` |
| `strong` | `strong` | If `true`, activates a button with a heavier font weight. | `boolean` |
| `type` | `type` | The type of the button. Possible values are: `"submit"`, `"reset"` and `"button"`. Default value is: `"button"` | `"button" \| "reset" \| "submit"` |
| Property | Attribute | Description | Type | Default |
| ----------------- | ------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------- | ----------- |
| `buttonType` | `button-type` | The type of button. | `string` | `'button'` |
| `color` | `color` | The color to use from your application's color palette. Default options are: `"primary"`, `"secondary"`, `"tertiary"`, `"success"`, `"warning"`, `"danger"`, `"light"`, `"medium"`, and `"dark"`. For more information on colors, see [theming](/docs/theming/basics). | `string \| undefined` | `undefined` |
| `disabled` | `disabled` | If `true`, the user cannot interact with the button. | `boolean` | `false` |
| `expand` | `expand` | Set to `"block"` for a full-width button or to `"full"` for a full-width button without left and right borders. | `"block" \| "full" \| undefined` | `undefined` |
| `fill` | `fill` | Set to `"clear"` for a transparent button, to `"outline"` for a transparent button with a border, or to `"solid"`. The default style is `"solid"` except inside of a toolbar, where the default is `"clear"`. | `"clear" \| "default" \| "outline" \| "solid" \| undefined` | `undefined` |
| `href` | `href` | Contains a URL or a URL fragment that the hyperlink points to. If this property is set, an anchor tag will be rendered. | `string \| undefined` | `undefined` |
| `mode` | `mode` | The mode determines which platform styles to use. | `"ios" \| "md"` | `undefined` |
| `routerDirection` | `router-direction` | When using a router, it specifies the transition direction when navigating to another page using `href`. | `"back" \| "forward" \| "root" \| undefined` | `undefined` |
| `shape` | `shape` | The button shape. | `"round" \| undefined` | `undefined` |
| `size` | `size` | The button size. | `"default" \| "large" \| "small" \| undefined` | `undefined` |
| `strong` | `strong` | If `true`, activates a button with a heavier font weight. | `boolean` | `false` |
| `type` | `type` | The type of the button. | `"button" \| "reset" \| "submit"` | `'button'` |
## Events
| Event | Detail | Description |
| ---------- | ------ | ------------------------------------ |
| `ionBlur` | | Emitted when the button loses focus. |
| `ionFocus` | | Emitted when the button has focus. |
| Event | Description | Detail |
| ---------- | ------------------------------------ | ------ |
| `ionBlur` | Emitted when the button loses focus. | void |
| `ionFocus` | Emitted when the button has focus. | void |
## CSS Custom Properties