0.0.1 • Published 12 months ago

@owndir/materialui-tabview v0.0.1

Weekly downloads
-
License
-
Repository
-
Last release
12 months ago

Creates a material-ui TabContext, where tabs can be addressed via #anchors.

install

add the following to package.json:

{
  "dependencies": {
    "mui-tabview": "https://github.com/wiresnips/owndir-utils.git#workspace=materialui-tabview"
  }
}

note: this relies on access to git, which is unlikely on android.

usage

import TabView from 'mui-tabview'


<TabView tabs={[
    {
      label: "Tab-1",
      content: <TabContentComponent />
    },
    {
      label: "Tab-2",
      anchor: 'second-tab',
      content: <TabContentComponent />
    },
    // ...
  ]}
/>

If no anchor is specified, defaults to the-label, hyphenated. (if there's no label too, it uses tab-3, where the numberis the position of the tab)