mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
chore(build): rename ionic directory to src and update all references in the build process.
This commit is contained in:
13
src/components/tabs/test/badges/index.ts
Normal file
13
src/components/tabs/test/badges/index.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
import {App} from '../../../../../ionic';
|
||||
|
||||
|
||||
@App({
|
||||
templateUrl: 'main.html'
|
||||
})
|
||||
class E2EApp {
|
||||
myBadge:number = 55;
|
||||
|
||||
constructor() {}
|
||||
}
|
||||
|
||||
document.body.innerHTML += '<link href="styles.css" rel="stylesheet">'
|
||||
68
src/components/tabs/test/badges/main.html
Normal file
68
src/components/tabs/test/badges/main.html
Normal file
@@ -0,0 +1,68 @@
|
||||
|
||||
<!-- Text -->
|
||||
<ion-tabs no-navbar>
|
||||
<ion-tab tabTitle="Recents"></ion-tab>
|
||||
<ion-tab tabTitle="Favorites" tabBadge="32"></ion-tab>
|
||||
<ion-tab tabTitle="Settings"></ion-tab>
|
||||
</ion-tabs>
|
||||
|
||||
|
||||
<!-- Icons -->
|
||||
<ion-tabs no-navbar>
|
||||
<ion-tab tabIcon="call"></ion-tab>
|
||||
<ion-tab tabIcon="heart"></ion-tab>
|
||||
<ion-tab tabIcon="settings" tabBadge="all" tabBadgeStyle="primary"></ion-tab>
|
||||
</ion-tabs>
|
||||
|
||||
|
||||
<!-- Icons on top of text -->
|
||||
<ion-tabs no-navbar>
|
||||
<ion-tab tabTitle="Location" tabIcon="navigate" tabBadge="11" tabBadgeStyle="secondary"></ion-tab>
|
||||
<ion-tab tabTitle="Favorites" tabIcon="star"></ion-tab>
|
||||
<ion-tab tabTitle="Radio" tabIcon="musical-notes"></ion-tab>
|
||||
</ion-tabs>
|
||||
|
||||
|
||||
<!-- Icons below text -->
|
||||
<ion-tabs tabbarLayout="icon-bottom" no-navbar>
|
||||
<ion-tab tabTitle="Recents" tabIcon="call"></ion-tab>
|
||||
<ion-tab tabTitle="Favorites" tabIcon="heart" tabBadge="577" tabBadgeStyle="dark"></ion-tab>
|
||||
<ion-tab tabTitle="Settings" tabIcon="settings"></ion-tab>
|
||||
</ion-tabs>
|
||||
|
||||
|
||||
<!-- Icons right of text -->
|
||||
<ion-tabs tabbarLayout="icon-right" primary no-navbar>
|
||||
<ion-tab tabTitle="Recents" tabIcon="call"></ion-tab>
|
||||
<ion-tab tabTitle="Favorites" tabIcon="heart"></ion-tab>
|
||||
<ion-tab tabTitle="Settings" tabIcon="settings" tabBadge="1030" tabBadgeStyle="light"></ion-tab>
|
||||
</ion-tabs>
|
||||
|
||||
<!-- Icons left of text -->
|
||||
<ion-tabs tabbarLayout="icon-left" no-navbar>
|
||||
<ion-tab tabTitle="Recents" tabIcon="call" tabBadge="32" tabBadgeStyle="danger"></ion-tab>
|
||||
<ion-tab tabTitle="Favorites" tabIcon="heart"></ion-tab>
|
||||
<ion-tab tabTitle="Settings" tabIcon="settings"></ion-tab>
|
||||
</ion-tabs>
|
||||
|
||||
<!-- No icons -->
|
||||
<ion-tabs no-navbar tabbarLayout="icon-hide">
|
||||
<ion-tab tabTitle="Recents" tabIcon="call" [root]="root"></ion-tab>
|
||||
<ion-tab tabTitle="Favorites" tabIcon="heart" [root]="root" tabBadge="4"></ion-tab>
|
||||
<ion-tab tabTitle="Settings" tabIcon="settings" [root]="root"></ion-tab>
|
||||
</ion-tabs>
|
||||
|
||||
|
||||
<!-- No title -->
|
||||
<ion-tabs tabbarLayout="title-hide" secondary no-navbar>
|
||||
<ion-tab tabTitle="Recents" tabIcon="call" [root]="root" tabBadge="7" tabBadgeStyle="light"></ion-tab>
|
||||
<ion-tab tabTitle="Favorites" tabIcon="heart" [root]="root"></ion-tab>
|
||||
<ion-tab tabTitle="Settings" tabIcon="settings" [root]="root"></ion-tab>
|
||||
</ion-tabs>
|
||||
|
||||
<!-- Dynamic Badge -->
|
||||
<ion-tabs tabbarLayout="icon-left" no-navbar>
|
||||
<ion-tab tabTitle="Recents" tabIcon="call"></ion-tab>
|
||||
<ion-tab tabTitle="Favorites" tabIcon="heart"></ion-tab>
|
||||
<ion-tab tabTitle="Settings" tabIcon="settings" [tabBadge]="myBadge" tabBadgeStyle="primary"></ion-tab>
|
||||
</ion-tabs>
|
||||
12
src/components/tabs/test/badges/styles.css
Normal file
12
src/components/tabs/test/badges/styles.css
Normal file
@@ -0,0 +1,12 @@
|
||||
|
||||
ion-tabs {
|
||||
position: relative;
|
||||
top: auto;
|
||||
height: auto;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
ion-navbar-section,
|
||||
ion-content-section {
|
||||
display: none !important;
|
||||
}
|
||||
Reference in New Issue
Block a user