3.0.25 • Published 5 years ago
the-tab v3.0.25
the-tab
Tab for the-components
Installation
$ npm install the-tab --save
Usage
Live Demo is hosted on GitHub Page
'use strict'
import React from 'react'
import { TheTab, TheTabStyle } from 'the-tab'
import { TheButtonStyle } from 'the-button'
import { TheSpinStyle } from 'the-spin'
class ExampleComponent extends React.PureComponent {
constructor (props) {
super(props)
this.state = {
activeIndex: 1
}
}
render () {
return (
<div>
<TheButtonStyle/>
<TheSpinStyle/>
<TheTabStyle/>
<TheTab activeIndex={this.state.activeIndex}
onChange={({ activeIndex }) => this.setState({ activeIndex })}
buttons={['Tab01', 'Tab02', 'Tab03', 'Tab04']}
>
<TheTab.Content style={{ height: '100px' }}> This is Content 01 </TheTab.Content>
<TheTab.Content style={{ height: '300px' }}>
This is Content 02
<br/>
<a href="http://example.com">With some link</a>
</TheTab.Content>
<TheTab.Content spinning>
This is Content 03
</TheTab.Content>
<TheTab.Content>
This is Content 04
<div style={{ overflow: 'auto', border: '2px solid #AAA' }}>
<div style={{
width: '1200px',
whiteSpace: 'nowrap',
padding: '22px',
fontSize: '2em'
}}>
<pre>
This is a long long long long long long long long long long long long long long long long long long long long long long long long long long long long content
</pre>
</div>
</div>
</TheTab.Content>
</TheTab>
</div>
)
}
}
export default ExampleComponent
Components
TheTab
Tab for the-components
Props
Name | Type | Description | Default |
---|---|---|---|
activeIndex | number | Active tab index | 0 |
buttons | arrayOf node | Tab buttons | [] |
disableTouchAction | bool | Disable touch action | false |
onChange | func | Change handler | () => {} |
TheTabStyle
Style for TheTab
Props
Name | Type | Description | Default |
---|---|---|---|
options | object | Style options | {} |
License
This software is released under the MIT License.
Links
3.0.25
5 years ago
3.0.24
5 years ago
3.0.23
5 years ago
3.0.22
6 years ago
3.0.21
6 years ago
3.0.20
6 years ago
3.0.19
6 years ago
3.0.18
6 years ago
3.0.17
6 years ago
3.0.16
6 years ago
3.0.15
6 years ago
3.0.14
6 years ago
3.0.13
6 years ago
3.0.12
6 years ago
3.0.11
6 years ago
3.0.10
6 years ago
3.0.9
6 years ago
3.0.8
6 years ago
3.0.7
6 years ago
3.0.6
6 years ago
3.0.5
6 years ago
3.0.4
7 years ago
3.0.3
7 years ago
3.0.2
7 years ago
3.0.1
7 years ago
3.0.0
7 years ago
2.1.2
7 years ago
2.1.1
7 years ago
2.1.0
7 years ago
2.0.1
7 years ago
2.0.0
7 years ago
1.1.9
7 years ago
1.1.8
7 years ago
1.1.7
7 years ago
1.1.6
7 years ago
1.1.5
7 years ago
1.1.4
7 years ago
1.1.3
7 years ago
1.1.2
7 years ago
1.1.1
7 years ago
1.1.0
7 years ago
1.0.1
7 years ago
1.0.0
7 years ago