diff --git a/compass/app/pages/page/page.tsx b/compass/app/pages/page/page.tsx
new file mode 100644
index 0000000..1a03610
--- /dev/null
+++ b/compass/app/pages/page/page.tsx
@@ -0,0 +1,20 @@
+// pages/index.tsx
+"use client";
+
+
+import Drawer from '@/components/page/Drawer';
+// import { Metadata } from 'next'
+import {ChangeEvent, useState} from "react";
+
+// export const metadata: Metadata = {
+// title: 'Login',
+// }
+
+export default function Page() {
+ return (
+ <>
+
Resources
+ hi
+ >
+ );
+};
\ No newline at end of file
diff --git a/compass/components/InlineLink.tsx b/compass/components/InlineLink.tsx
index f2e45ef..018a5c3 100644
--- a/compass/components/InlineLink.tsx
+++ b/compass/components/InlineLink.tsx
@@ -1,15 +1,20 @@
import React, { ReactNode } from 'react';
interface Link {
- href?: string;
- children: ReactNode;
+ onClick?: (event: React.MouseEvent) => void;
+ href?: string;
+ children: ReactNode;
}
-const InlineLink: React.FC = ({href = '#', children}) => {
+const InlineLink: React.FC = ({href = '#', children, onClick}) => {
return (
-
- {children}
-
+
+ {children}
+
)
}
diff --git a/compass/components/page/Drawer.tsx b/compass/components/page/Drawer.tsx
new file mode 100644
index 0000000..6a1b712
--- /dev/null
+++ b/compass/components/page/Drawer.tsx
@@ -0,0 +1,71 @@
+import { FunctionComponent, ReactNode } from 'react';
+import Button from '@/components/Button'
+import React, { useState } from 'react';
+import {DATATYPE} from '@/utils/constants'
+import InlineLink from '@/components/InlineLink'
+
+
+type DrawerProps = {
+ title: string;
+ children: ReactNode;
+ onClick?: (event: React.MouseEvent) => void;
+ type?: "button" | "submit" | "reset"; // specify possible values for type
+ disabled?: boolean;
+ editableContent?: DATATYPE;
+};
+
+const Drawer: FunctionComponent = ({ title, children, editableContent }) => {
+ const [isOpen, setIsOpen] = useState(false);
+ const [isEditing, setIsEditing] = useState(false);
+ const [editContent, setEditContent] = useState(editableContent || '');
+
+ const toggleDrawer = () => setIsOpen(!isOpen);
+ const toggleEditing = () => setIsEditing(!isEditing);
+ const handleContentChange = (event: React.ChangeEvent) => {
+ setEditContent(event.target.value);
+ };
+
+ const drawerClassName = `fixed top-0 right-0 w-1/2 h-full bg-white shadow-xl transform ease-in-out duration-300 ${
+ isOpen ? "translate-x-0" : "translate-x-full"
+ }`;
+
+ const saveChanges = () => {
+ setIsEditing(false);
+ };
+
+ const addRow = () => {
+
+ }
+
+ return (
+
+
+
+
+
{title}
+
+
+
+
+
+
+ {isEditing ? (
+ <>
+
+ Save
+ >
+ ) : (
+ children
+ )}
+
+
+
+ );
+};
+
+export default Drawer;
\ No newline at end of file
diff --git a/compass/components/page/Field.tsx b/compass/components/page/Field.tsx
new file mode 100644
index 0000000..9ee44b1
--- /dev/null
+++ b/compass/components/page/Field.tsx
@@ -0,0 +1,4 @@
+// components/Field.tsx
+import { FunctionComponent, ReactNode } from 'react';
+import Button from '@/components/Button'
+import React, { useState } from 'react';