import React, { useState } from 'react'; import { Icon, IconName } from '../../component-library'; import TabBar from '.'; export default { title: 'Components/App/TabBar', argTypes: { isActive: { action: 'isActive', }, tabs: { control: 'array', }, onSelect: { action: 'onSelect', }, }, args: { tabs: [ { icon: , content: 'General', key: 'general', }, { icon: , content: 'Contacts', key: 'contacts', }, { icon: , content: 'Snaps', key: 'snaps', }, { icon: , content: 'SecurityAndPrivacy', key: 'securityAndPrivacy', }, { icon: , content: 'Alerts', key: 'alerts', }, { icon: , content: 'Networks', key: 'networks', }, { icon: , content: 'Experimental', key: 'experimental', }, { icon: , content: 'About', key: 'about', }, ], }, }; export const DefaultStory = (args) => { const [currentTab, setCurrentTab] = useState(''); const handleOnSelect = (key) => setCurrentTab(key); const handleIsActive = (key) => currentTab === key; return ( ); }; DefaultStory.storyName = 'Default';