phosphor-tabs
Advanced tools
Comparing version 1.0.0-rc.0 to 1.0.0-rc.1
@@ -150,2 +150,11 @@ import { Message } from 'phosphor-messaging'; | ||
/** | ||
* Get the tab bar header node. | ||
* | ||
* #### Notes | ||
* This node can be used to add extra content to the tab bar header. | ||
* | ||
* This is a read-only property. | ||
*/ | ||
headerNode: HTMLElement; | ||
/** | ||
* Get the tab bar body node. | ||
@@ -160,2 +169,11 @@ * | ||
/** | ||
* Get the tab bar footer node. | ||
* | ||
* #### Notes | ||
* This node can be used to add extra content to the tab bar footer. | ||
* | ||
* This is a read-only property. | ||
*/ | ||
footerNode: HTMLElement; | ||
/** | ||
* Get the tab bar content node. | ||
@@ -162,0 +180,0 @@ * |
@@ -27,2 +27,6 @@ /*----------------------------------------------------------------------------- | ||
/** | ||
* The class name added to a tab bar header node. | ||
*/ | ||
var HEADER_CLASS = 'p-TabBar-header'; | ||
/** | ||
* The class name added to a tab bar content node. | ||
@@ -32,2 +36,6 @@ */ | ||
/** | ||
* The class name added to a tab bar footer node. | ||
*/ | ||
var FOOTER_CLASS = 'p-TabBar-footer'; | ||
/** | ||
* The class name added to a tab bar tab. | ||
@@ -95,8 +103,14 @@ */ | ||
var node = document.createElement('div'); | ||
var header = document.createElement('div'); | ||
var body = document.createElement('div'); | ||
var footer = document.createElement('div'); | ||
var content = document.createElement('ul'); | ||
header.className = HEADER_CLASS; | ||
body.className = BODY_CLASS; | ||
footer.className = FOOTER_CLASS; | ||
content.className = CONTENT_CLASS; | ||
body.appendChild(content); | ||
node.appendChild(header); | ||
node.appendChild(body); | ||
node.appendChild(footer); | ||
return node; | ||
@@ -266,2 +280,17 @@ }; | ||
}); | ||
Object.defineProperty(TabBar.prototype, "headerNode", { | ||
/** | ||
* Get the tab bar header node. | ||
* | ||
* #### Notes | ||
* This node can be used to add extra content to the tab bar header. | ||
* | ||
* This is a read-only property. | ||
*/ | ||
get: function () { | ||
return this.node.getElementsByClassName(HEADER_CLASS)[0]; | ||
}, | ||
enumerable: true, | ||
configurable: true | ||
}); | ||
Object.defineProperty(TabBar.prototype, "bodyNode", { | ||
@@ -282,2 +311,17 @@ /** | ||
}); | ||
Object.defineProperty(TabBar.prototype, "footerNode", { | ||
/** | ||
* Get the tab bar footer node. | ||
* | ||
* #### Notes | ||
* This node can be used to add extra content to the tab bar footer. | ||
* | ||
* This is a read-only property. | ||
*/ | ||
get: function () { | ||
return this.node.getElementsByClassName(FOOTER_CLASS)[0]; | ||
}, | ||
enumerable: true, | ||
configurable: true | ||
}); | ||
Object.defineProperty(TabBar.prototype, "contentNode", { | ||
@@ -284,0 +328,0 @@ /** |
{ | ||
"name": "phosphor-tabs", | ||
"version": "1.0.0-rc.0", | ||
"version": "1.0.0-rc.1", | ||
"description": "Phosphor widgets for creating tab bars and tab panels.", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
Sorry, the diff of this file is not supported yet
64224
1733