mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
docs(): update component readme
This commit is contained in:
@@ -1,56 +1,7 @@
|
||||
import { Component, Element, Prop } from '@stencil/core';
|
||||
import { getElementClassObject } from '../../utils/theme';
|
||||
|
||||
/**
|
||||
* @name Button
|
||||
* @module ionic
|
||||
* @description
|
||||
* Buttons are simple components in Ionic. They can consist of text and icons
|
||||
* and be enhanced by a wide range of attributes.
|
||||
*
|
||||
* @usage
|
||||
*
|
||||
* ```html
|
||||
*
|
||||
* <!-- Colors -->
|
||||
* <ion-button>Default</ion-button>
|
||||
* <ion-button color="secondary">Secondary</ion-button>
|
||||
* <ion-button color="danger">Danger</ion-button>
|
||||
* <ion-button color="light">Light</ion-button>
|
||||
* <ion-button color="dark">Dark</ion-button>
|
||||
*
|
||||
* <!-- Shapes -->
|
||||
* <ion-button expand="full">Full Button</ion-button>
|
||||
* <ion-button expand="block">Block Button</ion-button>
|
||||
* <ion-button round>Round Button</ion-button>
|
||||
*
|
||||
* <!-- Outline -->
|
||||
* <ion-button expand="full" fill="outline">Outline + Full</ion-button>
|
||||
* <ion-button expand="block" fill="outline">Outline + Block</ion-button>
|
||||
* <ion-button round fill="outline">Outline + Round</ion-button>
|
||||
*
|
||||
* <!-- Icons -->
|
||||
* <ion-button>
|
||||
* <ion-icon slot="start" name="star"></ion-icon>
|
||||
* Left Icon
|
||||
* </ion-button>
|
||||
*
|
||||
* <ion-button>
|
||||
* Right Icon
|
||||
* <ion-icon slot="end" name="star"></ion-icon>
|
||||
* </ion-button>
|
||||
*
|
||||
* <ion-button>
|
||||
* <ion-icon slot="icon-only" name="star"></ion-icon>
|
||||
* </ion-button>
|
||||
*
|
||||
* <!-- Sizes -->
|
||||
* <ion-button size="large">Large</ion-button>
|
||||
* <ion-button>Default</ion-button>
|
||||
* <ion-button size="small">Small</ion-button>
|
||||
* ```
|
||||
*
|
||||
*/
|
||||
|
||||
@Component({
|
||||
tag: 'ion-button',
|
||||
styleUrls: {
|
||||
|
||||
@@ -59,39 +59,29 @@ and be enhanced by a wide range of attributes.
|
||||
|
||||
## Properties
|
||||
|
||||
#### block
|
||||
|
||||
boolean
|
||||
|
||||
|
||||
#### buttonType
|
||||
|
||||
string
|
||||
|
||||
|
||||
#### clear
|
||||
|
||||
boolean
|
||||
|
||||
|
||||
#### color
|
||||
|
||||
string
|
||||
|
||||
|
||||
#### default
|
||||
|
||||
boolean
|
||||
|
||||
|
||||
#### disabled
|
||||
|
||||
boolean
|
||||
|
||||
|
||||
#### full
|
||||
#### expand
|
||||
|
||||
boolean
|
||||
any
|
||||
|
||||
|
||||
#### fill
|
||||
|
||||
any
|
||||
|
||||
|
||||
#### href
|
||||
@@ -104,34 +94,19 @@ string
|
||||
boolean
|
||||
|
||||
|
||||
#### large
|
||||
|
||||
boolean
|
||||
|
||||
|
||||
#### mode
|
||||
|
||||
any
|
||||
|
||||
|
||||
#### outline
|
||||
|
||||
boolean
|
||||
|
||||
|
||||
#### round
|
||||
|
||||
boolean
|
||||
|
||||
|
||||
#### small
|
||||
#### size
|
||||
|
||||
boolean
|
||||
|
||||
|
||||
#### solid
|
||||
|
||||
boolean
|
||||
any
|
||||
|
||||
|
||||
#### strong
|
||||
@@ -141,39 +116,29 @@ boolean
|
||||
|
||||
## Attributes
|
||||
|
||||
#### block
|
||||
|
||||
boolean
|
||||
|
||||
|
||||
#### buttonType
|
||||
|
||||
string
|
||||
|
||||
|
||||
#### clear
|
||||
|
||||
boolean
|
||||
|
||||
|
||||
#### color
|
||||
|
||||
string
|
||||
|
||||
|
||||
#### default
|
||||
|
||||
boolean
|
||||
|
||||
|
||||
#### disabled
|
||||
|
||||
boolean
|
||||
|
||||
|
||||
#### full
|
||||
#### expand
|
||||
|
||||
boolean
|
||||
any
|
||||
|
||||
|
||||
#### fill
|
||||
|
||||
any
|
||||
|
||||
|
||||
#### href
|
||||
@@ -186,34 +151,19 @@ string
|
||||
boolean
|
||||
|
||||
|
||||
#### large
|
||||
|
||||
boolean
|
||||
|
||||
|
||||
#### mode
|
||||
|
||||
any
|
||||
|
||||
|
||||
#### outline
|
||||
|
||||
boolean
|
||||
|
||||
|
||||
#### round
|
||||
|
||||
boolean
|
||||
|
||||
|
||||
#### small
|
||||
#### size
|
||||
|
||||
boolean
|
||||
|
||||
|
||||
#### solid
|
||||
|
||||
boolean
|
||||
any
|
||||
|
||||
|
||||
#### strong
|
||||
|
||||
Reference in New Issue
Block a user