3.0.3 • Published 9 years ago

apeman-react-tab v3.0.3

Weekly downloads
7
License
MIT
Repository
github
Last release
9 years ago

apeman-react-tab

Build Status Code Climate Code Coverage npm Version JS Standard

apeman react package for tab component.

Installation

$ npm install apeman-react-tab --save

Demo

Live demo is hosted on GitHub Pages.

Demo Image

Usage

'use strict'

import React from 'react'
import {
  ApTab,
  ApTabItem,
  ApTabStyle
} from 'apeman-react-tab'

const ExampleComponent = React.createClass({
  getInitialState () {
    return {
      tab: 'FOO'
    }
  },
  selectTab(tab) {
    const s = this
    s.setState({
      tab: tab
    })
  },
  render () {
    const s = this
    return (
      <div>
        <ApTabStyle />
        <ApTab>
          <ApTabItem selected={ s.state.tab === "FOO" } onTap={ () =>s.selectTab('FOO') }>foo</ApTabItem>
          <ApTabItem selected={ s.state.tab === "BAR" } onTap={ () =>s.selectTab('BAR') }>bar</ApTabItem>
        </ApTab>
      </div>
    )
  }
})

Components

ApTabContent

Props

NameTypeDefaultDescription
selectedboolThe tab is selected or not

ApTabGroup

Props

NameTypeDefaultDescription

ApTabItem

Props

NameTypeDefaultDescription

ApTabStyle

Props

NameTypeDefaultDescription

ApTab

Props

NameTypeDefaultDescription

License

This software is released under the MIT License.

Links

3.0.3

9 years ago

3.0.2

9 years ago

3.0.1

9 years ago

3.0.0

9 years ago

2.0.13

9 years ago

2.0.12

9 years ago

2.0.11

9 years ago

2.0.10

9 years ago

2.0.9

9 years ago

2.0.8

9 years ago

2.0.7

9 years ago

2.0.6

9 years ago

2.0.5

9 years ago

2.0.4

9 years ago

2.0.3

9 years ago

2.0.2

9 years ago

2.0.1

9 years ago

2.0.0

9 years ago

1.0.9

9 years ago

1.0.8

9 years ago

1.0.7

9 years ago

1.0.6

9 years ago

1.0.5

9 years ago

1.0.4

9 years ago

1.0.3

9 years ago

1.0.2

9 years ago

1.0.1

9 years ago

1.0.0

10 years ago