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';
import {forwardRef} from 'angular2/angular2';
import {AndroidAttribute} from '../helpers';
@Page({
templateUrl: 'buttons/buttons.html',
directives: [forwardRef(() => AndroidAttribute)]
})
export class ButtonsPage {
constructor() {
}
}
@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() {
}
}
export * from './basic/pages';
export * from './block/pages';
export * from './clear/pages';
export * from './components/pages';
export * from './fab/pages';
export * from './full/pages';
export * from './icons/pages';
export * from './outline/pages';
export * from './round/pages';
export * from './sizes/pages';

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