Skip to content
Snippets Groups Projects
Commit 5bc888c7 authored by Sinzeanu Demetriad's avatar Sinzeanu Demetriad
Browse files

docs(faraday-ui):

parent 793ebead
No related branches found
No related tags found
3 merge requests!222Sprint #26,!217Sprint #26,!191Hin 1116 documentation
import PropTypes from 'prop-types'
import { compose, withStateHandlers } from 'recompose'
const Tabs = ({ items, selectedTab, changeTab, children }) =>
children({ selectedTab, changeTab })
Tabs.proptypes = {
/** property that sets any tab as curent selcted tab */
selectedTab: PropTypes.func,
/** property that changes tab on click */
changeTab: PropTypes.func,
}
Tabs.defaultProp = {
selectedTab: undefined,
changeTab: undefined,
}
export default compose(
withStateHandlers(({ selectedTab = 0 }) => ({ selectedTab }), {
changeTab: () => selectedTab => ({
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment