Files
ionic-framework/core/src/components/header/header.tsx
2018-03-12 16:02:25 -04:00

40 lines
786 B
TypeScript

import { Component, Prop } from '@stencil/core';
import { createThemedClasses } from '../../utils/theme';
@Component({
tag: 'ion-header',
styleUrls: {
ios: 'header.ios.scss',
md: 'header.md.scss'
},
host: {
theme: 'header'
}
})
export class Header {
mode: string;
color: string;
/**
* If true, the header will be translucent.
* Note: In order to scroll content behind the header, the `fullscreen`
* attribute needs to be set on the content.
* Defaults to `false`.
*/
@Prop() translucent = false;
hostData() {
const themedClasses = this.translucent ? createThemedClasses(this.mode, this.color, 'header-translucent') : {};
const hostClasses = {
...themedClasses
};
return {
class: hostClasses
};
}
}