Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Migrate SideNav to Shadcn/Tailwind #14508

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 5 additions & 10 deletions src/components/SideNav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { useEffect, useState } from "react"
import { motion } from "framer-motion"
import { useTranslation } from "next-i18next"
import { MdChevronRight } from "react-icons/md"
import { Box, HStack, Icon } from "@chakra-ui/react"
import { Box } from "@chakra-ui/react"

import { ChildOnlyProp } from "@/lib/types"
import { DeveloperDocsLink } from "@/lib/interfaces"
Expand All @@ -11,6 +11,8 @@ import { BaseLink, LinkProps } from "@/components/Link"

import docLinks from "../data/developer-docs-links.yaml"

import { HStack } from "./ui/flex"

export const dropdownIconContainerVariant = {
open: {
rotate: 90,
Expand All @@ -34,14 +36,7 @@ const innerLinksVariants = {

const LinkContainer = ({ children }: ChildOnlyProp) => {
return (
<HStack
w="full"
justify="space-between"
py={2}
pe={4}
ps={8}
_hover={{ bgColor: "ednBackground" }}
>
<HStack className="w-full justify-between py-2 pe-4 ps-8 hover:bg-[ednBackground]">
{children}
</HStack>
)
Expand Down Expand Up @@ -106,7 +101,7 @@ const NavLink = ({ item, path, isTopLevel }: NavLinkProps) => {
cursor="pointer"
display="flex"
>
<Icon as={MdChevronRight} boxSize={6} color="secondary" />
<MdChevronRight className="h-6 w-6" color="secondary" />
</Box>
</LinkContainer>
<Box
Expand Down
Loading