From 2c9d485d2dba1b3cd759a1a1c87bb02b6907ff14 Mon Sep 17 00:00:00 2001 From: Brandy Carney Date: Tue, 10 Apr 2018 18:26:33 -0400 Subject: [PATCH] docs(buttons): add documentation and usage --- core/src/components/buttons/readme.md | 10 +++++ .../components/buttons/test/icon/index.html | 4 +- core/src/components/buttons/usage/angular.md | 41 +++++++++++++++++++ .../components/buttons/usage/javascript.md | 41 +++++++++++++++++++ 4 files changed, 94 insertions(+), 2 deletions(-) create mode 100644 core/src/components/buttons/usage/angular.md create mode 100644 core/src/components/buttons/usage/javascript.md diff --git a/core/src/components/buttons/readme.md b/core/src/components/buttons/readme.md index 933bd34ba9..0a3e4df168 100644 --- a/core/src/components/buttons/readme.md +++ b/core/src/components/buttons/readme.md @@ -1,5 +1,15 @@ # ion-buttons +The Buttons component is a container element. Buttons placed in a toolbar should be placed inside of the `` element. + +The `` element can be positioned inside of the toolbar using a named slot. The below chart has a description of each slot. + +| Slot | Description | +|--------------|----------------------------------------------------------------------------------------------------------| +| `secondary` | Positions element to the `left` of the content in `ios` mode, and directly to the `right` in `md` mode. | +| `primary` | Positions element to the `right` of the content in `ios` mode, and to the far `right` in `md` mode. | +| `start` | Positions to the `left` of the content in LTR, and to the `right` in RTL. | +| `end` | Positions to the `right` of the content in LTR, and to the `left` in RTL. | diff --git a/core/src/components/buttons/test/icon/index.html b/core/src/components/buttons/test/icon/index.html index 53504d1b5e..d609f94cc7 100644 --- a/core/src/components/buttons/test/icon/index.html +++ b/core/src/components/buttons/test/icon/index.html @@ -2,7 +2,7 @@ - Button - Basic + Buttons - Basic @@ -11,7 +11,7 @@ - Button - Basic + Buttons - Basic start btn diff --git a/core/src/components/buttons/usage/angular.md b/core/src/components/buttons/usage/angular.md new file mode 100644 index 0000000000..722cd58570 --- /dev/null +++ b/core/src/components/buttons/usage/angular.md @@ -0,0 +1,41 @@ +```html + + + + + Back Button + + + + + + + + + + + + Default Buttons + + + + + + + + + + + + + + Right side menu toggle + + + + + + + + +``` \ No newline at end of file diff --git a/core/src/components/buttons/usage/javascript.md b/core/src/components/buttons/usage/javascript.md new file mode 100644 index 0000000000..1149590d8a --- /dev/null +++ b/core/src/components/buttons/usage/javascript.md @@ -0,0 +1,41 @@ +```html + + + + + Back Button + + + + + + + + + + + + Default Buttons + + + + + + + + + + + + + + Right side menu toggle + + + + + + + + +``` \ No newline at end of file