diff --git a/packages/frontend/.env b/packages/frontend/.env deleted file mode 100644 index 90e8eac4..00000000 --- a/packages/frontend/.env +++ /dev/null @@ -1,7 +0,0 @@ -REACT_APP_SERVER_URL = 'http://localhost:8000' - -REACT_APP_GITHUB_CLIENT_ID = -REACT_APP_GITHUB_PWA_TEMPLATE_REPO = -REACT_APP_GITHUB_IMAGE_UPLOAD_PWA_TEMPLATE_REPO = - -REACT_APP_WALLET_CONNECT_ID = diff --git a/packages/frontend/src/components/shared/Heading/Heading.theme.ts b/packages/frontend/src/components/shared/Heading/Heading.theme.ts new file mode 100644 index 00000000..5ce5bb5c --- /dev/null +++ b/packages/frontend/src/components/shared/Heading/Heading.theme.ts @@ -0,0 +1,7 @@ +import { tv, type VariantProps } from 'tailwind-variants'; + +export const headingTheme = tv({ + base: ['text-elements-high-em', 'font-display', 'font-normal'], +}); + +export type HeadingVariants = VariantProps; diff --git a/packages/frontend/src/components/shared/Heading/Heading.tsx b/packages/frontend/src/components/shared/Heading/Heading.tsx new file mode 100644 index 00000000..0621039f --- /dev/null +++ b/packages/frontend/src/components/shared/Heading/Heading.tsx @@ -0,0 +1,30 @@ +import React, { type PropsWithChildren } from 'react'; + +import { headingTheme, type HeadingVariants } from './Heading.theme'; +import { PolymorphicProps } from 'types/common'; + +export type HeadingElementType = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6'; + +export type HeadingProps = + PropsWithChildren>; + +export const Heading = ({ + children, + as, + className, + ...props +}: HeadingProps) => { + // Component is the element that will be rendered + const Component = as ?? 'h1'; + + return ( + + {children} + + ); +}; diff --git a/packages/frontend/src/components/shared/Heading/index.ts b/packages/frontend/src/components/shared/Heading/index.ts new file mode 100644 index 00000000..6406e7b0 --- /dev/null +++ b/packages/frontend/src/components/shared/Heading/index.ts @@ -0,0 +1 @@ +export * from './Heading'; diff --git a/packages/frontend/src/components/Sidebar.tsx b/packages/frontend/src/components/shared/Sidebar/Sidebar.tsx similarity index 79% rename from packages/frontend/src/components/Sidebar.tsx rename to packages/frontend/src/components/shared/Sidebar/Sidebar.tsx index 1c679971..0d746749 100644 --- a/packages/frontend/src/components/Sidebar.tsx +++ b/packages/frontend/src/components/shared/Sidebar/Sidebar.tsx @@ -5,8 +5,8 @@ import { Organization } from 'gql-client'; import { Option } from '@material-tailwind/react'; import { useDisconnect } from 'wagmi'; -import { useGQLClient } from '../context/GQLClientContext'; -import AsyncSelect from './shared/AsyncSelect'; +import { useGQLClient } from 'context/GQLClientContext'; +import AsyncSelect from 'components/shared/AsyncSelect'; import { ChevronGrabberHorizontal, FolderIcon, @@ -14,10 +14,11 @@ import { LifeBuoyIcon, QuestionMarkRoundIcon, SettingsSlidersIcon, -} from './shared/CustomIcon'; +} from 'components/shared/CustomIcon'; import { Tabs } from 'components/shared/Tabs'; +import { Heading } from 'components/shared/Heading'; -const Sidebar = () => { +export const Sidebar = () => { const { orgSlug } = useParams(); const navigate = useNavigate(); const client = useGQLClient(); @@ -42,20 +43,20 @@ const Sidebar = () => { }, [disconnect, navigate]); return ( -
-
- -
- Snowball Logo - - Snowball - -
- +
+ {/* Logo */} + +
+ Snowball Logo + Snowball +
+ + {/* Switch organization */} +
{ )} arrow={} > - {/* TODO: Show label organization and manage in option */} + {/* // TODO: Show label organization and manage in option */} {organizations.map((org) => (