Created
February 23, 2015 22:18
-
-
Save mikaelbr/7059b39405969a8f8c64 to your computer and use it in GitHub Desktop.
This file contains 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
const Tab = Component({item}, {onRemove}) => DOM.div({ | |
className: 'tab' | |
/* ... */ | |
}, [ | |
DOM.button({onClick: onRemove}) | |
]) | |
const TabDeck = Component(items => DOM.div({ | |
className: 'tabs' | |
/* .... */ | |
}, items.map(item => Tab({item, { statics: { onRemove: () => items.remove(item) } } )); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment