-
Notifications
You must be signed in to change notification settings - Fork 210
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
586e2f8
commit fcecf30
Showing
31 changed files
with
409 additions
and
398 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
80 changes: 33 additions & 47 deletions
80
packages/arb-token-bridge-ui/src/components/MainContent/MainContent.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
import { Tab } from '@headlessui/react' | ||
import { PaperAirplaneIcon } from '@heroicons/react/24/outline' | ||
import { PropsWithChildren } from 'react' | ||
import { twMerge } from 'tailwind-merge' | ||
import Image from 'next/image' | ||
import { useTransactionReminderInfo } from './TransactionHistory/useTransactionReminderInfo' | ||
|
||
function StyledTab({ children, ...props }: PropsWithChildren) { | ||
return ( | ||
<Tab | ||
className="flex h-full items-center justify-center gap-2 rounded p-1 text-lg ui-selected:bg-black/75" | ||
{...props} | ||
> | ||
{children} | ||
</Tab> | ||
) | ||
} | ||
|
||
StyledTab.displayName = 'StyledTab' | ||
|
||
export function TopNavBar() { | ||
const { colorClassName } = useTransactionReminderInfo() | ||
|
||
return ( | ||
<Tab.List | ||
className={twMerge( | ||
'grid w-full max-w-[600px] grid-cols-2 bg-white/20 p-[8px] text-white md:rounded' | ||
)} | ||
> | ||
<StyledTab aria-label="Switch to Bridge Tab"> | ||
<PaperAirplaneIcon className="h-3 w-3" /> | ||
Bridge | ||
</StyledTab> | ||
<StyledTab aria-label="Switch to Transaction History Tab"> | ||
<Image | ||
src="/icons/history.svg" | ||
width={24} | ||
height={24} | ||
alt="history icon" | ||
/> | ||
Txn History{' '} | ||
<span | ||
className={twMerge('h-3 w-3 rounded-full', colorClassName.light)} | ||
/> | ||
</StyledTab> | ||
</Tab.List> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.