diff --git a/apps/token/src/components/modal/index.ts b/apps/token/src/components/modal/index.ts
deleted file mode 100644
index 133aa7420..000000000
--- a/apps/token/src/components/modal/index.ts
+++ /dev/null
@@ -1 +0,0 @@
-export * from './modal';
diff --git a/apps/token/src/components/modal/modal.tsx b/apps/token/src/components/modal/modal.tsx
deleted file mode 100644
index 5ec4906e4..000000000
--- a/apps/token/src/components/modal/modal.tsx
+++ /dev/null
@@ -1,13 +0,0 @@
-import React from 'react';
-
-interface ModalProps {
- children: React.ReactNode;
- title: string;
-}
-
-export const Modal = ({ children, title }: ModalProps) => (
-
-);
diff --git a/apps/token/src/components/nav/nav.css b/apps/token/src/components/nav/nav.css
new file mode 100644
index 000000000..6b50b698a
--- /dev/null
+++ b/apps/token/src/components/nav/nav.css
@@ -0,0 +1,25 @@
+@keyframes slideIn {
+ from {
+ transform: translateX(100%);
+ }
+ to {
+ transform: translateX(0);
+ }
+}
+
+@keyframes slideOut {
+ from {
+ transform: translateX(0);
+ }
+ to {
+ transform: translateX(100%);
+ }
+}
+
+.drawer-content[data-state='open'] {
+ animation: slideIn 150ms ease-out forwards;
+}
+
+.drawer-content[data-state='closed'] {
+ animation: slideOut 150ms ease-in forwards;
+}
diff --git a/apps/token/src/components/nav/nav.tsx b/apps/token/src/components/nav/nav.tsx
index 816e074d8..99e82c981 100644
--- a/apps/token/src/components/nav/nav.tsx
+++ b/apps/token/src/components/nav/nav.tsx
@@ -1,6 +1,9 @@
-import { Drawer } from '@blueprintjs/core';
+import './nav.css';
+
+import classNames from 'classnames';
import debounce from 'lodash/debounce';
import React from 'react';
+import * as Dialog from '@radix-ui/react-dialog';
import { useTranslation } from 'react-i18next';
import { Link, NavLink } from 'react-router-dom';
@@ -126,10 +129,10 @@ const NavHeader = ({ fairground }: { fairground: boolean }) => {
)}
{fairground ? t('fairgroundTitle') : t('title')}
@@ -148,6 +151,13 @@ const IconLine = ({ inverted }: { inverted: boolean }) => (
const NavDrawer = ({ inverted }: { inverted: boolean }) => {
const { appState, appDispatch } = useAppState();
+ const drawerContentClasses = classNames(
+ 'drawer-content', // needed for css animation
+ // Positions the modal in the center of screen
+ 'fixed w-[80vw] max-w-[420px] top-0 right-0',
+ 'flex flex-col flex-nowrap justify-between h-full bg-banner overflow-y-scroll border-l border-white',
+ 'bg-black text-white-95'
+ );
return (
<>
-
+
appDispatch({
type: AppStateActionType.SET_DRAWER,
- isOpen: false,
+ isOpen,
})
}
- size="80%"
- className="border border-white max-w-[420px]"
>
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
>
);
};
@@ -206,35 +217,36 @@ const NavLinks = ({ isDesktop }: { isDesktop: boolean }) => {
{ route: Routes.WITHDRAW, text: t('Withdraw') },
{ route: Routes.GOVERNANCE, text: t('Governance') },
];
+ const navClasses = classNames('flex', {
+ 'flex-row gap-8 mt-8 uppercase': isDesktop,
+ 'flex-col': !isDesktop,
+ });
+
return (
-