Phoenix "Web Tabs"-Komponente auf Mithril-Basis.
Die Komponente ist Teil des Phoenix Reisen Design-Systems.
Mithril wird benötigt.
npm install --save @phoenixreisen/tabs
// entweder CommonJS
const Tabs = require('@phoenixreisen/tabs');
// oder ES6+
import Tabs from '@phoenixreisen/tabs';
// Hyperscript bzw. Javascript
m(Tabs,
{ tabs: ['Tab 1', 'Tab 2'] },
[ m('div.tab1'), m('div.tab2') ]
);
// JSX
<Tabs tabs={['Tab 1', 'Tab 2']}>
{[
<div class="tab1">Tab 1</div>,
<div class="tab2">Tab 2</div>,
]}
</Tabs>
npm install
npm run test
npm version [major|minor|patch] # increase version x.x.x => major.minor.patch
npm publish # upload to npm
git push