15 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
b5b804725f refactor(select): rename the checked attribute to selected on option
BREAKING CHANGES:

The Option component’s `checked` attribute has been renamed to
`selected` in order to select an option. This is to the follow the MDN
spec for a select option:
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/option

If a `ngModel` is added to the Select component the value of the
`ngModel` will take precedence over the `selected` attribute.

references #7334
2016-08-03 11:38:41 -04: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
4b36c3430d chore(angular): update to angular 2.0.0-rc.1 2016-05-05 10:45:49 -07:00
617d36d42c docs(demos/localStorage): only display allowed keys
Related: https://github.com/driftyco/ionic-site/issues/453
2016-04-16 17:36:36 -05:00
ca50527437 docs(demos): update local storage demo
references driftyco/ionic-site#397
2016-02-04 19:53:33 -05:00
ec106e989e docs(demos): converting navbars to toolbars
references #5311
2016-02-03 15:16:41 -05:00
2d691b05d7 docs(demos): prettifying some more local-storage 2016-01-27 17:09:52 -05:00
8bc853f681 docs(demos): prettifying local-storage demo 2016-01-27 17:04:14 -05:00
d7dec0a914 docs(demos): update demos with item-refactor 2016-01-27 12:09:58 -05:00
e827231bf8 fix(demos): ion-content closing tag 2016-01-11 13:37:40 -06:00
52204de117 docs(demos): update icons 2016-01-07 11:33:21 -06:00
e522d2e0ff docs(demos): local storage api demo 2015-12-08 16:14:02 -06:00