Created
February 5, 2018 17:45
-
-
Save auniverseaway/d95dee1604757a0aaa040c7522293873 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { DOMModel, DOMComponent } from 'react-dom-components'; | |
import TabControl from './TabControl'; | |
import { TabItemModel } from '../tabItem/TabItemDOM'; | |
class SubTitleModel extends DOMModel { | |
constructor(element) { | |
super(element); | |
this.getTextContent(); | |
} | |
} | |
class TabControlModel extends DOMModel { | |
constructor(element) { | |
super(element); | |
this.getDataAttribute('title'); | |
this.getDataAttribute('model'); | |
this.getChildComponent('h2', SubTitleModel); | |
this.getChildComponentArray('tab-item', TabItemModel); | |
} | |
} | |
export default class TabControlDOM extends DOMComponent { | |
static get nodeName() { return 'tab-control'; } | |
static get model() { return TabControlModel; } | |
static get component() { return TabControl; } | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment