13 Commits

Author SHA1 Message Date
55a0257dbc refactor(colors): color should be added as an input instead of directly adding the color to the component
BREAKING CHANGES:

Colors should be passed in the `color` input on components, not added
individually as an attribute on the component.

For example:

```
<ion-tabs primary>
```

Becomes

```
<ion-tabs color=”primary”>
```

Or to bind an expression to color:

```
<ion-navbar [color]="barColor">
   ...
</ion-navbar>
```

```ts
@Component({
  templateUrl: 'build/pages/about/about.html'
})
export class AboutPage {
  barColor: string;

  constructor(private nav: NavController, platform: Platform) {
    this.barColor = platform.is('android') ? 'primary' : 'light';
  }
}
```

Reason for this change:
It was difficult to dynamically add colors to components, especially if
the name of the color attribute was unknown in the template.
This change keeps the css flat since we aren’t chaining color
attributes on components and instead we assign a class to the component
which includes the color’s name.
This allows you to easily toggle a component between multiple colors.
Speeds up performance because we are no longer reading through all of
the attributes to grab the color ones.

references #7467
closes #7087 closes #7401 closes #7523
2016-08-23 17:16:55 -04:00
938864e8d0 refactor(button): add ion-button attribute and icon attributes to style buttons
BREAKING CHANGES:

- `<button>` becomes `<button ion-button>`
- `<a button>` becomes `<a ion-button>`
- `<button ion-item>` does not get the `ion-button` attribute
- Buttons inside of `<ion-item-options>` do get the `ion-button`
attribute
- Removed the `category` attribute, this should be passed in
`ion-button` instead.
- Button attributes added for icons in buttons: `icon-only`,
`icon-left`, and `icon-right`

closes #7466
2016-08-16 17:11:02 -04:00
dfb8ba4b98 docs(demo): update the item sliding demo so the archive does something
also hide pointer events on img

fixes #7547
2016-08-04 13:41:12 -04:00
108f821e99 docs(demos): clean up item sliding demo to simplify it
removed the toolbar styling and the reorder so it is just sliding.

references #7547
2016-08-04 13:16:21 -04:00
d993a1bfd8 fix(reorder): reorder can be used with any element 2016-06-30 01:14:21 +02:00
bfdc898945 feat(item): sliding items work with list reorder 2016-06-24 17:57:21 +02:00
05c7b8f0d7 docs(demos): update API demos so they all have ion-navs
- add spacing between imports
- alphabetize imports
- removed app.html files in favor of an inline ion-nav
- cleaned up config demo so it uses proper syntax
- use file name main.html for the first page for the demo
- name the app ApiDemoApp and first page ApiDemoPage
- replace the ion-toolbars with ion-navbars

closes #7019
closes driftyco/ionic-site#647
2016-06-22 14:45:49 -04:00
33672aef62 demos(header): update header markup 2016-06-17 11:39:59 -05:00
db9fa7ead3 fix(item): improve open/close logic, update demos 2016-06-11 20:07:08 -05:00
d1b92e6335 docs(demos): update item-sliding demo styling 2016-02-09 18:59:20 -06:00
5ac1cf9048 docs(demos): fix item sliding demo and add the slides demo to the slide doc
references driftyco/ionic-site#397
2016-02-05 19:54:42 -05:00
68671a2951 docs(demos): update item sliding to use primary option and add another login
references driftyco/ionic-site#397
2016-02-05 19:48:24 -05:00
5f21823d27 docs(demos): add item sliding & option API demo and fix docs for it
references driftyco/ionic-site#397
2016-02-05 19:40:09 -05:00