refactor(components): move function to get classes from host to utils

Moved getElementClassObject function to utils/theme and updated the
components with child buttons to use this function to get the host
classes.

Adds the ability to pass classes down from host to child for content
and segment button

closes ionic-team/stencil#84
This commit is contained in:
Brandy Carney
2017-08-11 13:26:10 -04:00
parent 319d38ac1a
commit 4dcb174245
11 changed files with 80 additions and 68 deletions

View File

@@ -37,11 +37,11 @@ export class Spinner {
}
hostData() {
const spinnerThemedClasses = createThemedClasses(this.mode, this.color, `spinner spinner-${this.name}`);
spinnerThemedClasses['spinner-paused'] = true;
const themedClasses = createThemedClasses(this.mode, this.color, `spinner spinner-${this.name}`);
themedClasses['spinner-paused'] = true;
return {
class: spinnerThemedClasses
class: themedClasses
};
}

View File

@@ -7,6 +7,6 @@
<script src="/dist/ionic.js"></script>
</head>
<body>
<ion-spinner></ion-spinner>
<ion-spinner name="bubbles"></ion-spinner>
</body>
</html>