refactor(demos): make each button section a module

This commit is contained in:
Drew Rygh
2015-11-04 16:05:13 -06:00
parent 9df5b5982f
commit d5d05a267f
22 changed files with 152 additions and 124 deletions

View File

@ -0,0 +1,13 @@
import {Page} from 'ionic/ionic';
import {forwardRef} from 'angular2/angular2';
import {AndroidAttribute} from '../../helpers';
@Page({
templateUrl: 'buttons/basic/basic.html',
directives: [forwardRef(() => AndroidAttribute)]
})
export class BasicPage {
constructor() {
}
}

View File

@ -0,0 +1,13 @@
import {Page} from 'ionic/ionic';
import {forwardRef} from 'angular2/angular2';
import {AndroidAttribute} from '../../helpers';
@Page({
templateUrl: 'buttons/block.html',
directives: [forwardRef(() => AndroidAttribute)]
})
export class BlockPage {
constructor() {
}
}

View File

@ -1,103 +1,10 @@
import {Page} from 'ionic/ionic'; export * from './basic/pages';
import {forwardRef} from 'angular2/angular2'; export * from './block/pages';
import {AndroidAttribute} from '../helpers'; export * from './clear/pages';
export * from './components/pages';
@Page({ export * from './fab/pages';
templateUrl: 'buttons/buttons.html', export * from './full/pages';
directives: [forwardRef(() => AndroidAttribute)] export * from './icons/pages';
}) export * from './outline/pages';
export class ButtonsPage { export * from './round/pages';
constructor() { export * from './sizes/pages';
}
}
@Page({
templateUrl: 'buttons/block.html',
directives: [forwardRef(() => AndroidAttribute)]
})
export class BlockButtonsPage {
constructor() {
}
}
@Page({
templateUrl: 'buttons/clear.html',
directives: [forwardRef(() => AndroidAttribute)]
})
export class ClearButtonsPage {
constructor() {
}
}
@Page({
templateUrl: 'buttons/full.html',
directives: [forwardRef(() => AndroidAttribute)]
})
export class FullButtonsPage {
constructor() {
}
}
@Page({
templateUrl: 'buttons/outline.html',
directives: [forwardRef(() => AndroidAttribute)]
})
export class OutlineButtonsPage {
constructor() {
}
}
@Page({
templateUrl: 'buttons/round.html',
directives: [forwardRef(() => AndroidAttribute)]
})
export class RoundButtonsPage {
constructor() {
}
}
@Page({
templateUrl: 'buttons/fab.html',
directives: [forwardRef(() => AndroidAttribute)]
})
export class FabPage {
constructor() {
}
}
@Page({
templateUrl: 'buttons/sizes.html',
directives: [forwardRef(() => AndroidAttribute)]
})
export class ButtonSizesPage {
constructor() {
}
}
@Page({
templateUrl: 'buttons/icons.html',
directives: [forwardRef(() => AndroidAttribute)]
})
export class IconButtonsPage {
constructor() {
}
}
@Page({
templateUrl: 'buttons/components.html',
directives: [forwardRef(() => AndroidAttribute)]
})
export class ButtonsInComponentsPage {
constructor() {
}
}

View File

@ -0,0 +1,13 @@
import {Page} from 'ionic/ionic';
import {forwardRef} from 'angular2/angular2';
import {AndroidAttribute} from '../../helpers';
@Page({
templateUrl: 'buttons/clear.html',
directives: [forwardRef(() => AndroidAttribute)]
})
export class ClearPage {
constructor() {
}
}

View File

@ -0,0 +1,13 @@
import {Page} from 'ionic/ionic';
import {forwardRef} from 'angular2/angular2';
import {AndroidAttribute} from '../../helpers';
@Page({
templateUrl: 'buttons/components.html',
directives: [forwardRef(() => AndroidAttribute)]
})
export class ComponentsPage {
constructor() {
}
}

View File

@ -0,0 +1,13 @@
import {Page} from 'ionic/ionic';
import {forwardRef} from 'angular2/angular2';
import {AndroidAttribute} from '../../helpers';
@Page({
templateUrl: 'buttons/fab.html',
directives: [forwardRef(() => AndroidAttribute)]
})
export class FabPage {
constructor() {
}
}

View File

@ -0,0 +1,13 @@
import {Page} from 'ionic/ionic';
import {forwardRef} from 'angular2/angular2';
import {AndroidAttribute} from '../../helpers';
@Page({
templateUrl: 'buttons/full.html',
directives: [forwardRef(() => AndroidAttribute)]
})
export class FullPage {
constructor() {
}
}

View File

@ -0,0 +1,13 @@
import {Page} from 'ionic/ionic';
import {forwardRef} from 'angular2/angular2';
import {AndroidAttribute} from '../../helpers';
@Page({
templateUrl: 'buttons/icons.html',
directives: [forwardRef(() => AndroidAttribute)]
})
export class IconsPage {
constructor() {
}
}

View File

@ -0,0 +1,13 @@
import {Page} from 'ionic/ionic';
import {forwardRef} from 'angular2/angular2';
import {AndroidAttribute} from '../../helpers';
@Page({
templateUrl: 'buttons/outline.html',
directives: [forwardRef(() => AndroidAttribute)]
})
export class OutlinePage {
constructor() {
}
}

View File

@ -0,0 +1,13 @@
import {Page} from 'ionic/ionic';
import {forwardRef} from 'angular2/angular2';
import {AndroidAttribute} from '../../helpers';
@Page({
templateUrl: 'buttons/round.html',
directives: [forwardRef(() => AndroidAttribute)]
})
export class RoundPage {
constructor() {
}
}

View File

@ -0,0 +1,13 @@
import {Page} from 'ionic/ionic';
import {forwardRef} from 'angular2/angular2';
import {AndroidAttribute} from '../../helpers';
@Page({
templateUrl: 'buttons/sizes.html',
directives: [forwardRef(() => AndroidAttribute)]
})
export class SizesPage {
constructor() {
}
}

View File

@ -4,17 +4,7 @@ import {Platform, Navbar} from 'ionic/ionic';
import {ActionSheetPage} from './actionSheet/actionSheet'; import {ActionSheetPage} from './actionSheet/actionSheet';
import {ButtonsPage, import * as buttons from './buttons/buttons';
BlockButtonsPage,
ClearButtonsPage,
FullButtonsPage,
OutlineButtonsPage,
RoundButtonsPage,
FabPage,
ButtonSizesPage,
IconButtonsPage,
ButtonsInComponentsPage} from './buttons/buttons';
import * as cards from './cards/cards'; import * as cards from './cards/cards';
import {FormsPage, import {FormsPage,
@ -106,16 +96,17 @@ export function hasScrollbar() {
export function getPageFor(hash) { export function getPageFor(hash) {
return { return {
'action-sheets': ActionSheetPage, 'action-sheets': ActionSheetPage,
'buttons': ButtonsPage,
'block-buttons': BlockButtonsPage, 'buttons': buttons.BasicPage,
'clear-buttons': ClearButtonsPage, 'block-buttons': buttons.BlockPage,
'full-buttons': FullButtonsPage, 'clear-buttons': buttons.ClearPage,
'outline-buttons': OutlineButtonsPage, 'full-buttons': buttons.FullPage,
'round-buttons': RoundButtonsPage, 'outline-buttons': buttons.OutlinePage,
'floating-action-buttons': FabPage, 'round-buttons': buttons.RoundPage,
'buttons-in-components': ButtonsInComponentsPage, 'floating-action-buttons': buttons.FabPage,
'button-sizes': ButtonSizesPage, 'buttons-in-components': buttons.ComponentsPage,
'icon-buttons': IconButtonsPage, 'button-sizes': buttons.SizesPage,
'icon-buttons': buttons.IconsPage,
'cards': cards.BasicPage, 'cards': cards.BasicPage,
'card-header': cards.HeaderPage, 'card-header': cards.HeaderPage,