MCPcopy Create free account
hub / github.com/neomjs/neo / createExampleComponent

Method createExampleComponent

examples/tab/container/MainContainer.mjs:206–235  ·  view source on GitHub ↗

* Overridden from `ConfigurationViewport`. This method creates the actual `TabContainer` instance * to be demonstrated. It is configured with three initial tabs and a listener to sync user-driven * tab changes back to the configuration panel. * @returns {Neo.tab.Container} The configu

()

Source from the content-addressed store, hash-verified

204 * @returns {Neo.tab.Container} The configured TabContainer instance.
205 */
206 createExampleComponent() {
207 return Neo.create(TabContainer, {
208 dragResortable: true,
209 height : 300,
210 width : 500,
211 style : {margin: '20px'},
212
213 itemDefaults: {
214 ntype: 'component',
215 cls : ['neo-examples-tab-component'],
216 style: {padding: '20px'}
217 },
218
219 items: [{
220 header: {iconCls: 'fa fa-home', text: 'Tab 1', flag: 'tab1',},
221 vdom : {html: 'Tab 1 Content'}
222 }, {
223 header: {iconCls: 'fa fa-play-circle', text: 'Tab 2'},
224 vdom : {html: 'Tab 2 Content'}
225 }, {
226 header: {iconCls: 'fa fa-user', text: 'Tab 3', badgeText: 'hello'},
227 vdom : {html: 'Tab 3 Content'}
228 }],
229
230 listeners: {
231 activeIndexChange: this.onUserActiveIndexChange,
232 scope : this
233 }
234 })
235 }
236
237 /**
238 * A helper method to retrieve the header button for the third tab, which is used for demonstrating

Callers

nothing calls this directly

Calls 1

createMethod · 0.45

Tested by

no test coverage detected