import { NavigationContext } from '@/context/navigation'; import { useContext } from 'react'; import styled from 'styled-components'; const Container = styled.div` background-color: white; bottom: 0; display: flex; flex-direction: row; gap: 10px; height: 40px; justify-content: space-around; position: fixed; width: 100%; `; const TabButton = styled.button` background: rgba(240, 240, 240); border-radius: 6px; border: none; cursor: pointer; height: 100%; width: 100%; `; export function NavigationBar() { const { setCurrentTab, tabsList } = useContext(NavigationContext); return ( {tabsList.map(({ key, title }) => ( setCurrentTab(key)}> {title} ))} ); } function Tab({ children, visible }) { if (!visible) return null; return children; } export function Tabs({ tabs }) { const { currentTab } = useContext(NavigationContext); return tabs.map(({ Component, key }) => ( )); }