/* * Copyright (c) 2018-present, Revolut LTD. * * This source code is licensed under the Apache 2.0 license found in the * LICENSE file in the root directory of this source tree. */ import React from 'react' import { select, text, boolean } from '@storybook/addon-knobs' import { Tabs } from '.' import { withKnobs } from '@storybook/addon-knobs' const positionOptions = { top: 'top', bottom: 'bottom', } const items = [ { id: 'burger', title: 'Burger', link: '/market/burger', }, { id: 'sushi', title: 'Sushi', link: '/market/sushi', }, { id: 'vodka', title: 'Vodka', link: '/market/vodka', disabled: true, }, { id: 'pizza', title: 'Pizza', link: '/market/pizza', }, ] export const controllable = () => ( ) export const customOnChangeFn = () => ( console.log(`Custom onChange: ${value}`)} /> ) export const customRenderItemFn = () => ( ( )} /> ) export const customRenderListFn = () => ( ( )} renderList={({ list, renderItem, handleChange, state }) => list.map(item =>
  • {renderItem({ item, state, handleChange })}
  • ) } /> ) export default { title: 'Tabs', component: Tabs, decorators: [withKnobs], }