mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-18 19:21:34 +08:00
refactor(demos): make each button section a module
This commit is contained in:
13
demos/component-docs/buttons/basic/pages.ts
Normal file
13
demos/component-docs/buttons/basic/pages.ts
Normal 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() {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
13
demos/component-docs/buttons/block/pages.ts
Normal file
13
demos/component-docs/buttons/block/pages.ts
Normal 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() {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
@ -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() {
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
13
demos/component-docs/buttons/clear/pages.ts
Normal file
13
demos/component-docs/buttons/clear/pages.ts
Normal 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() {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
13
demos/component-docs/buttons/components/pages.ts
Normal file
13
demos/component-docs/buttons/components/pages.ts
Normal 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() {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
13
demos/component-docs/buttons/fab/pages.ts
Normal file
13
demos/component-docs/buttons/fab/pages.ts
Normal 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() {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
13
demos/component-docs/buttons/full/pages.ts
Normal file
13
demos/component-docs/buttons/full/pages.ts
Normal 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() {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
13
demos/component-docs/buttons/icons/pages.ts
Normal file
13
demos/component-docs/buttons/icons/pages.ts
Normal 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() {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
13
demos/component-docs/buttons/outline/pages.ts
Normal file
13
demos/component-docs/buttons/outline/pages.ts
Normal 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() {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
13
demos/component-docs/buttons/round/pages.ts
Normal file
13
demos/component-docs/buttons/round/pages.ts
Normal 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() {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
13
demos/component-docs/buttons/sizes/pages.ts
Normal file
13
demos/component-docs/buttons/sizes/pages.ts
Normal 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() {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
@ -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,
|
||||||
|
Reference in New Issue
Block a user