@owndir/materialui-tabview
v0.0.1
Published
Creates a [material-ui TabContext](https://mui.com/material-ui/react-tabs/#experimental-api), where tabs can be addressed via `#anchors`.
Downloads
8
Readme
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)