Tab routing
This commit is contained in:
@@ -1,30 +0,0 @@
|
||||
import classNames from 'classnames';
|
||||
import Icon from './Icon';
|
||||
import Link from '../../components/Link';
|
||||
import { useEffect, useState } from 'react';
|
||||
|
||||
const Tab = ({ title, href, icon, selected, selectedIcon, onClick }) => {
|
||||
return (
|
||||
<Link href={href}>
|
||||
<a
|
||||
onClick={onClick}
|
||||
href="#"
|
||||
className={classNames('px-6 rounded-md text-sm text-center font-medium cursor-pointer', {
|
||||
'text-gray-500 dark:text-white': !selected,
|
||||
'text-gray-800 dark:text-gray-600': selected,
|
||||
})}
|
||||
>
|
||||
{icon && (
|
||||
<Icon
|
||||
icon={selected ? selectedIcon : icon}
|
||||
className="cursor-pointer"
|
||||
style={{ fontSize: '18px' }}
|
||||
/>
|
||||
)}
|
||||
<label className="block cursor-pointer">{title}</label>
|
||||
</a>
|
||||
</Link>
|
||||
);
|
||||
};
|
||||
|
||||
export default Tab;
|
||||
@@ -1,13 +0,0 @@
|
||||
const TabBar = ({ children }) => (
|
||||
<nav
|
||||
id="tab-bar"
|
||||
className="py-2 h-16 w-full flex justify-center items-start bg-gray-50 z-10 dark:bg-gray-800"
|
||||
style={{
|
||||
height: `calc(env(safe-area-inset-bottom, 0px) + 56px)`,
|
||||
}}
|
||||
>
|
||||
{children}
|
||||
</nav>
|
||||
);
|
||||
|
||||
export default TabBar;
|
||||
@@ -1,5 +0,0 @@
|
||||
import ReactToggle from 'react-toggle';
|
||||
|
||||
const Toggle = props => <ReactToggle {...props} icons={false} />;
|
||||
|
||||
export default Toggle;
|
||||
Reference in New Issue
Block a user