chore(navbar): move navbar to separate directory

This commit is contained in:
Adam Bradley
2017-11-28 17:59:01 -06:00
parent 8c5c337933
commit ce6d79ceb9
5 changed files with 126 additions and 89 deletions

View File

@ -1926,6 +1926,40 @@ declare global {
}
import {
Navbar as IonNavbar
} from './components/navbar/navbar';
declare global {
interface HTMLIonNavbarElement extends IonNavbar, HTMLElement {
}
var HTMLIonNavbarElement: {
prototype: HTMLIonNavbarElement;
new (): HTMLIonNavbarElement;
};
interface HTMLElementTagNameMap {
"ion-navbar": HTMLIonNavbarElement;
}
interface ElementTagNameMap {
"ion-navbar": HTMLIonNavbarElement;
}
namespace JSX {
interface IntrinsicElements {
"ion-navbar": JSXElements.IonNavbarAttributes;
}
}
namespace JSXElements {
export interface IonNavbarAttributes extends HTMLAttributes {
hideBackButton?: boolean,
backButtonText?: string,
backButtonIcon?: string,
hidden?: boolean
}
}
}
import {
Note as IonNote
} from './components/note/note';
@ -3292,40 +3326,6 @@ declare global {
}
import {
Navbar as IonNavbar
} from './components/toolbar/navbar';
declare global {
interface HTMLIonNavbarElement extends IonNavbar, HTMLElement {
}
var HTMLIonNavbarElement: {
prototype: HTMLIonNavbarElement;
new (): HTMLIonNavbarElement;
};
interface HTMLElementTagNameMap {
"ion-navbar": HTMLIonNavbarElement;
}
interface ElementTagNameMap {
"ion-navbar": HTMLIonNavbarElement;
}
namespace JSX {
interface IntrinsicElements {
"ion-navbar": JSXElements.IonNavbarAttributes;
}
}
namespace JSXElements {
export interface IonNavbarAttributes extends HTMLAttributes {
hideBackButton?: boolean,
backButtonText?: string,
backButtonIcon?: string,
hidden?: boolean
}
}
}
import {
Toolbar as IonToolbar
} from './components/toolbar/toolbar';

View File

@ -3,42 +3,6 @@ import { createThemedClasses } from '../../utils/theme';
import { Config } from '../../index';
/**
* @name Navbar
* @description
* Navbar acts as the navigational toolbar, which also comes with a back
* button. A navbar can contain a `ion-title`, any number of buttons,
* a segment, or a searchbar. Navbars must be placed within an
* `<ion-header>` in order for them to be placed above the content.
* It's important to note that navbar's are part of the dynamic navigation
* stack. If you need a static toolbar, use ion-toolbar.
*
* @usage
* ```html
* <ion-header>
*
* <ion-navbar>
* <ion-button menuToggle>
* <ion-icon slot="icon-only" name="menu"></ion-icon>
* </ion-button>
*
* <ion-title>
* Page Title
* </ion-title>
*
* <ion-buttons end>
* <ion-button (click)="openModal()">
* <ion-icon slot="icon-only" name="options"></ion-icon>
* </ion-button>
* </ion-buttons>
* </ion-navbar>
*
* </ion-header>
* ```
*
* @demo /docs/demos/src/navbar/
* @see {@link ../../toolbar/Toolbar/ Toolbar API Docs}
*/
@Component({
tag: 'ion-navbar',
host: {

View File

@ -0,0 +1,83 @@
# ion-navbar
Navbar acts as the navigational toolbar, which also comes with a back
button. A navbar can contain a `ion-title`, any number of buttons,
a segment, or a searchbar. Navbars must be placed within an
`<ion-header>` in order for them to be placed above the content.
It's important to note that navbar's are part of the dynamic navigation
stack. If you need a static toolbar, use ion-toolbar.
```html
<ion-header>
<ion-navbar>
<ion-button menuToggle>
<ion-icon slot="icon-only" name="menu"></ion-icon>
</ion-button>
<ion-title>
Page Title
</ion-title>
<ion-buttons end>
<ion-button (click)="openModal()">
<ion-icon slot="icon-only" name="options"></ion-icon>
</ion-button>
</ion-buttons>
</ion-navbar>
</ion-header>
```
<!-- Auto Generated Below -->
## Properties
#### backButtonIcon
string
#### backButtonText
string
#### hidden
boolean
#### hideBackButton
boolean
## Attributes
#### backButtonIcon
string
#### backButtonText
string
#### hidden
boolean
#### hideBackButton
boolean
----------------------------------------------
*Built by [StencilJS](https://stenciljs.com/)*

View File

@ -87,44 +87,34 @@ attribute to the element.
## Properties
#### backButtonIcon
#### color
string
#### backButtonText
#### mode
string
any
#### hidden
boolean
#### hideBackButton
#### translucent
boolean
## Attributes
#### backButtonIcon
#### color
string
#### backButtonText
#### mode
string
any
#### hidden
boolean
#### hideBackButton
#### translucent
boolean

View File

@ -86,6 +86,7 @@ export {
export { ModalController } from './components/modal-controller/modal-controller';
export { Nav } from './components/nav/nav';
export { PublicNav } from './components/nav/nav-interface';
export { Navbar } from './components/navbar/navbar';
export { NavController } from './components/nav-controller/nav-controller';
export { Note } from './components/note/note';
export { Page } from './components/page/page';
@ -146,7 +147,6 @@ export {
} from './components/toast/toast';
export { ToastController } from './components/toast-controller/toast-controller';
export { Toggle } from './components/toggle/toggle';
export { Navbar } from './components/toolbar/navbar';
export { Toolbar } from './components/toolbar/toolbar';
export * from './navigation/nav-interfaces';