style(components): add protected to the render function

This commit is contained in:
Brandy Carney
2017-10-17 13:28:37 -04:00
parent a932e673ff
commit 0b40520371
69 changed files with 69 additions and 69 deletions

View File

@ -68,7 +68,7 @@ export class IonApp implements App {
return null; return null;
} }
render() { protected render() {
return ([ return ([
<slot></slot> <slot></slot>
]); ]);

View File

@ -21,7 +21,7 @@ import { Component } from '@stencil/core';
} }
}) })
export class Avatar { export class Avatar {
render() { protected render() {
return <slot></slot>; return <slot></slot>;
} }
} }

View File

@ -39,7 +39,7 @@ import { Component } from '@stencil/core';
} }
}) })
export class Badge { export class Badge {
render() { protected render() {
return <slot></slot>; return <slot></slot>;
} }
} }

View File

@ -163,7 +163,7 @@ export class Button {
*/ */
@Prop() color: string; @Prop() color: string;
render() { protected render() {
const buttonType = this.buttonType; const buttonType = this.buttonType;
const mode = this.mode; const mode = this.mode;

View File

@ -17,7 +17,7 @@ export class Buttons {
} }
} }
render() { protected render() {
return <slot></slot>; return <slot></slot>;
} }
} }

View File

@ -12,7 +12,7 @@ import { Component } from '@stencil/core';
} }
}) })
export class CardContent { export class CardContent {
render() { protected render() {
return <slot></slot>; return <slot></slot>;
} }
} }

View File

@ -13,7 +13,7 @@ import { Component } from '@stencil/core';
} }
}) })
export class CardHeader { export class CardHeader {
render() { protected render() {
return <slot></slot>; return <slot></slot>;
} }
} }

View File

@ -13,7 +13,7 @@ import { Component } from '@stencil/core';
} }
}) })
export class CardTitle { export class CardTitle {
render() { protected render() {
return <slot></slot>; return <slot></slot>;
} }
} }

View File

@ -12,7 +12,7 @@ import { Component } from '@stencil/core';
} }
}) })
export class Card { export class Card {
render() { protected render() {
return <slot></slot>; return <slot></slot>;
} }
} }

View File

@ -148,7 +148,7 @@ export class Checkbox {
}; };
} }
render() { protected render() {
const checkboxClasses: CssClassMap = { const checkboxClasses: CssClassMap = {
'checkbox-icon': true, 'checkbox-icon': true,
'checkbox-checked': this.checked 'checkbox-checked': this.checked

View File

@ -72,7 +72,7 @@ export class ChipButton {
return classList; return classList;
} }
render() { protected render() {
const buttonType = 'chip-button'; const buttonType = 'chip-button';
const hostClasses = getElementClassObject(this.el.classList); const hostClasses = getElementClassObject(this.el.classList);

View File

@ -99,7 +99,7 @@ import { Component } from '@stencil/core';
} }
}) })
export class Chip { export class Chip {
render() { protected render() {
return <slot></slot>; return <slot></slot>;
} }
} }

View File

@ -78,7 +78,7 @@ export class Content {
@Prop() fullscreen: boolean = false; @Prop() fullscreen: boolean = false;
render() { protected render() {
const props: any = {}; const props: any = {};
const scrollStyle: any = {}; const scrollStyle: any = {};

View File

@ -98,7 +98,7 @@ export class FabContainer {
fab.close(); fab.close();
} }
render() { protected render() {
return ( return (
<slot></slot> <slot></slot>
); );

View File

@ -53,7 +53,7 @@ export class FabList {
}; };
} }
render() { protected render() {
return ( return (
<slot></slot> <slot></slot>
); );

View File

@ -151,7 +151,7 @@ export class FabButton {
]; ];
} }
render() { protected render() {
const themedClasses = createThemedClasses(this.mode, this.color, 'fab'); const themedClasses = createThemedClasses(this.mode, this.color, 'fab');
const hostClasses = getElementClassObject(this.el.classList); const hostClasses = getElementClassObject(this.el.classList);

View File

@ -34,7 +34,7 @@ export class Fixed {
}; };
} }
render() { protected render() {
return ( return (
<slot></slot> <slot></slot>
); );

View File

@ -8,7 +8,7 @@ import { Component } from '@stencil/core';
} }
}) })
export class Footer { export class Footer {
render() { protected render() {
return <slot></slot>; return <slot></slot>;
} }
} }

View File

@ -8,7 +8,7 @@ import { Component } from '@stencil/core';
} }
}) })
export class Header { export class Header {
render() { protected render() {
return <slot></slot>; return <slot></slot>;
} }
} }

View File

@ -319,7 +319,7 @@ export class Input implements InputComponent {
} }
render() { protected render() {
const themedClasses = createThemedClasses(this.mode, this.color, 'text-input'); const themedClasses = createThemedClasses(this.mode, this.color, 'text-input');
// TODO aria-labelledby={this.item.labelId} // TODO aria-labelledby={this.item.labelId}

View File

@ -298,7 +298,7 @@ export class Textarea implements TextareaComponent {
} }
render() { protected render() {
const themedClasses = createThemedClasses(this.mode, this.color, 'text-input'); const themedClasses = createThemedClasses(this.mode, this.color, 'text-input');
// TODO aria-labelledby={this.item.labelId} // TODO aria-labelledby={this.item.labelId}

View File

@ -13,7 +13,7 @@ import { Component } from '@stencil/core';
} }
}) })
export class ItemDivider { export class ItemDivider {
render() { protected render() {
return [ return [
<slot name='start'></slot>, <slot name='start'></slot>,
<div class='item-inner'> <div class='item-inner'>

View File

@ -34,7 +34,7 @@ export class ItemOption {
return !!ele; return !!ele;
} }
render() { protected render() {
const themedClasses = createThemedClasses(this.mode, this.color, 'item-option-button'); const themedClasses = createThemedClasses(this.mode, this.color, 'item-option-button');
const TagType = this.href ? 'a' : 'button'; const TagType = this.href ? 'a' : 'button';

View File

@ -55,7 +55,7 @@ export class ItemOptions {
return this.el.offsetWidth; return this.el.offsetWidth;
} }
render() { protected render() {
return <slot></slot>; return <slot></slot>;
} }
} }

View File

@ -485,7 +485,7 @@ export class ItemSliding {
}; };
} }
render() { protected render() {
return ( return (
<ion-gesture {...{ <ion-gesture {...{
'canStart': this.canStart.bind(this), 'canStart': this.canStart.bind(this),

View File

@ -104,7 +104,7 @@ export class Item {
return this.itemId + '-' + (++this.ids); return this.itemId + '-' + (++this.ids);
} }
render() { protected render() {
let childStyles = {}; let childStyles = {};
for (var key in this.itemStyles) { for (var key in this.itemStyles) {

View File

@ -63,7 +63,7 @@ export class Label {
}); });
} }
render() { protected render() {
return <slot></slot>; return <slot></slot>;
} }
} }

View File

@ -13,7 +13,7 @@ import { Component } from '@stencil/core';
} }
}) })
export class ListHeader { export class ListHeader {
render() { protected render() {
return <slot></slot>; return <slot></slot>;
} }
} }

View File

@ -18,7 +18,7 @@ export class List {
@State() openContainer: ItemSliding; @State() openContainer: ItemSliding;
render() { protected render() {
return <slot></slot>; return <slot></slot>;
} }

View File

@ -180,7 +180,7 @@ export class Menu {
return this.isRightSide ? 'right' : 'left'; return this.isRightSide ? 'right' : 'left';
} }
render() { protected render() {
return ([ return ([
<div class='menu-inner'> <div class='menu-inner'>
<slot></slot> <slot></slot>

View File

@ -102,7 +102,7 @@ export class NavControllerImpl implements NavController {
}); });
} }
render() { protected render() {
return <slot></slot>; return <slot></slot>;
} }
} }

View File

@ -124,7 +124,7 @@ export class IonNav implements Nav {
} }
render() { protected render() {
return <slot></slot>; return <slot></slot>;
} }
} }

View File

@ -16,7 +16,7 @@ export class PageOne {
nav.push('page-two'); nav.push('page-two');
} }
render() { protected render() {
return [<ion-header> return [<ion-header>
<ion-navbar> <ion-navbar>
<ion-title>Page One</ion-title> <ion-title>Page One</ion-title>

View File

@ -16,7 +16,7 @@ export class PageThree {
nav.pop(); nav.pop();
} }
render() { protected render() {
return [<ion-header> return [<ion-header>
<ion-navbar> <ion-navbar>
<ion-title>Page Three</ion-title> <ion-title>Page Three</ion-title>

View File

@ -21,7 +21,7 @@ export class PageTwo {
nav.pop(); nav.pop();
} }
render() { protected render() {
return [<ion-header> return [<ion-header>
<ion-navbar> <ion-navbar>
<ion-title>Page Two</ion-title> <ion-title>Page Two</ion-title>

View File

@ -40,7 +40,7 @@ import { Component } from '@stencil/core';
} }
}) })
export class Note { export class Note {
render() { protected render() {
return <slot></slot>; return <slot></slot>;
} }
} }

View File

@ -13,7 +13,7 @@ import { Component } from '@stencil/core';
} }
}) })
export class Page { export class Page {
render() { protected render() {
return <slot></slot>; return <slot></slot>;
} }
} }

View File

@ -266,7 +266,7 @@ export class Popover {
} }
} }
render() { protected render() {
const ThisComponent = this.component; const ThisComponent = this.component;
const wrapperClasses = createThemedClasses(this.mode, this.color, 'popover-wrapper'); const wrapperClasses = createThemedClasses(this.mode, this.color, 'popover-wrapper');

View File

@ -177,7 +177,7 @@ export class RadioGroup {
}; };
} }
render() { protected render() {
return <slot></slot>; return <slot></slot>;
} }
} }

View File

@ -164,7 +164,7 @@ export class Radio {
}; };
} }
render() { protected render() {
const radioClasses: CssClassMap = { const radioClasses: CssClassMap = {
'radio-icon': true, 'radio-icon': true,
'radio-checked': this.checked 'radio-checked': this.checked

View File

@ -57,7 +57,7 @@ export class RangeKnob {
}; };
} }
render() { protected render() {
if (this.pin) { if (this.pin) {
return [ return [
<div class='range-pin' role='presentation'>{this.val}</div>, <div class='range-pin' role='presentation'>{this.val}</div>,

View File

@ -329,7 +329,7 @@ export class Range implements BaseInputComponent {
}; };
} }
render() { protected render() {
return [ return [
<slot name='range-start' />, <slot name='range-start' />,

View File

@ -372,7 +372,7 @@ export class ReorderGroup {
}; };
} }
render() { protected render() {
return ( return (
<ion-gesture {...{ <ion-gesture {...{
disableScroll: true, disableScroll: true,

View File

@ -12,7 +12,7 @@ export class ItemReorder {
this.hasContent = this.ele.childElementCount > 0; this.hasContent = this.ele.childElementCount > 0;
} }
render() { protected render() {
// TODO: https://github.com/ionic-team/stencil/issues/171 // TODO: https://github.com/ionic-team/stencil/issues/171
if (this.hasContent === true) { if (this.hasContent === true) {
return <slot></slot>; return <slot></slot>;

View File

@ -21,7 +21,7 @@ export class RouteLink {
*/ */
} }
render() { protected render() {
/* /*
const router = document.querySelector(this.router); const router = document.querySelector(this.router);
const match = router.match const match = router.match

View File

@ -32,7 +32,7 @@ export class Route {
*/ */
} }
render() { protected render() {
/* /*
this.match.url = this.routerInstance.routeMatch.url; this.match.url = this.routerInstance.routeMatch.url;
const match = this.match const match = this.match

View File

@ -55,7 +55,7 @@ export class Router {
console.log('Hash change', e) console.log('Hash change', e)
} }
render() { protected render() {
console.log('<ion-router> rendering') console.log('<ion-router> rendering')
return ( return (
<slot></slot> <slot></slot>

View File

@ -341,7 +341,7 @@ export class Scroll {
this.gesture = this.detail = this.detail.event = null; this.gesture = this.detail = this.detail.event = null;
} }
render() { protected render() {
return <slot></slot>; return <slot></slot>;
} }

View File

@ -349,7 +349,7 @@ export class Searchbar {
// TODO remove the ion-buttons and replace with native buttons to remove // TODO remove the ion-buttons and replace with native buttons to remove
// the button dependency // the button dependency
render() { protected render() {
return [ return [
<div class='searchbar-input-container'> <div class='searchbar-input-container'>
<ion-button <ion-button

View File

@ -105,7 +105,7 @@ export class SegmentButton {
return classList; return classList;
} }
render() { protected render() {
const themedClasses = createThemedClasses(this.mode, this.color, 'segment-button'); const themedClasses = createThemedClasses(this.mode, this.color, 'segment-button');
const hostClasses = getElementClassObject(this.el.classList); const hostClasses = getElementClassObject(this.el.classList);

View File

@ -134,7 +134,7 @@ export class Segment {
}; };
} }
render() { protected render() {
return <slot></slot>; return <slot></slot>;
} }
} }

View File

@ -32,7 +32,7 @@ export class SelectOption {
return this.el.textContent || ''; return this.el.textContent || '';
} }
render() { protected render() {
return <slot></slot>; return <slot></slot>;
} }

View File

@ -50,7 +50,7 @@ export class SelectPopover {
this.dismiss(value); this.dismiss(value);
} }
render() { protected render() {
return ( return (
<ion-list no-lines={this.mode === 'md'}> <ion-list no-lines={this.mode === 'md'}>
<ion-radio-group value={this.value}> <ion-radio-group value={this.value}>

View File

@ -369,7 +369,7 @@ export class Select {
}; };
} }
render() { protected render() {
let addPlaceholderClass = false; let addPlaceholderClass = false;
// If selected text has been passed in, use that first // If selected text has been passed in, use that first

View File

@ -8,7 +8,7 @@ import { Component, Prop } from '@stencil/core';
export class SkeletonText { export class SkeletonText {
@Prop() width: string = '100%'; @Prop() width: string = '100%';
render() { protected render() {
return <span style={{width: this.width}}>&nbsp;</span>; return <span style={{width: this.width}}>&nbsp;</span>;
} }
} }

View File

@ -28,7 +28,7 @@ export class Slide {
}; };
} }
render() { protected render() {
return <slot></slot>; return <slot></slot>;
} }
} }

View File

@ -133,7 +133,7 @@ export class Slides {
@Prop() keyboardControl: boolean; @Prop() keyboardControl: boolean;
render() { protected render() {
return ( return (
<div class='swiper-container' data-dir='rtl'> <div class='swiper-container' data-dir='rtl'>
<div class='swiper-wrapper'> <div class='swiper-wrapper'>

View File

@ -167,7 +167,7 @@ export class Spinner {
}; };
} }
render() { protected render() {
const name = this.getName(); const name = this.getName();
const spinner = SPINNERS[name] || SPINNERS['lines']; const spinner = SPINNERS[name] || SPINNERS['lines'];

View File

@ -265,7 +265,7 @@ export class SplitPane {
}; };
} }
render() { protected render() {
return <slot></slot>; return <slot></slot>;
} }

View File

@ -36,7 +36,7 @@ export class TabBar {
this.onTabSelected && this.onTabSelected(tab, index); this.onTabSelected && this.onTabSelected(tab, index);
} }
render() { protected render() {
return ( return (
<div class="tabbar" role="tablist"> <div class="tabbar" role="tablist">
{this.tabs.map((tab, index) => { {this.tabs.map((tab, index) => {

View File

@ -46,7 +46,7 @@ export class TabButton {
}; };
} }
render() { protected render() {
if (!this.tab) { if (!this.tab) {
return null; return null;
} }

View File

@ -5,7 +5,7 @@ import { Component } from '@stencil/core';
tag: 'ion-tab-highlight' tag: 'ion-tab-highlight'
}) })
export class TabHighlight { export class TabHighlight {
render() { protected render() {
return ( return (
<div></div> <div></div>
); );

View File

@ -94,7 +94,7 @@ export class Tab {
this.ionTabDidLoad.emit({ tab: this }); this.ionTabDidLoad.emit({ tab: this });
} }
render() { protected render() {
const RootComponent = this.root; const RootComponent = this.root;
return [ return [
<RootComponent />, <RootComponent />,

View File

@ -85,7 +85,7 @@ export class Tabs {
this.ionChange && this.ionChange(tab); this.ionChange && this.ionChange(tab);
} }
render() { protected render() {
return [ return [
<ion-tab-bar <ion-tab-bar
tabs={this.tabs} tabs={this.tabs}

View File

@ -13,7 +13,7 @@ import { Component } from '@stencil/core';
} }
}) })
export class Thumbnail { export class Thumbnail {
render() { protected render() {
return <slot></slot>; return <slot></slot>;
} }
} }

View File

@ -52,7 +52,7 @@ export class ToolbarTitle {
mode: string; mode: string;
color: string; color: string;
render() { protected render() {
const themedClasses = createThemedClasses(this.mode, this.color, 'toolbar-title'); const themedClasses = createThemedClasses(this.mode, this.color, 'toolbar-title');
return [ return [

View File

@ -149,7 +149,7 @@ export class Toggle implements BooleanInputComponent {
}; };
} }
render() { protected render() {
return ( return (
<ion-gesture {...{ <ion-gesture {...{
'canStart': this.canStart.bind(this), 'canStart': this.canStart.bind(this),

View File

@ -78,7 +78,7 @@ export class Navbar {
}; };
} }
render() { protected render() {
const backButtonIcon = this.backButtonIcon || this.config.get('backButtonText', 'Back'); const backButtonIcon = this.backButtonIcon || this.config.get('backButtonText', 'Back');
const backButtonText = this.backButtonText || this.config.get('backButtonIcon', 'Back'); const backButtonText = this.backButtonText || this.config.get('backButtonIcon', 'Back');

View File

@ -122,7 +122,7 @@ export class Toolbar {
}; };
} }
render() { protected render() {
const backgroundCss = createThemedClasses(this.mode, this.color, 'toolbar-background'); const backgroundCss = createThemedClasses(this.mode, this.color, 'toolbar-background');
const contentCss = createThemedClasses(this.mode, this.color, 'toolbar-content'); const contentCss = createThemedClasses(this.mode, this.color, 'toolbar-content');