-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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 SideNavMobile to Shadcn/Tailwind #14495
feat: Migrate SideNavMobile to Shadcn/Tailwind #14495
Conversation
✅ Deploy Preview for ethereumorg ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
️✅ There are no secrets present in this pull request anymore.If these secrets were true positive and are still valid, we highly recommend you to revoke them. 🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request. |
src/components/SideNavMobile.tsx
Outdated
@@ -2,7 +2,7 @@ import React, { useState } from "react" | |||
import { AnimatePresence, motion } from "framer-motion" | |||
import { useTranslation } from "next-i18next" | |||
import { MdChevronRight } from "react-icons/md" | |||
import { Box, Center, HStack, Icon } from "@chakra-ui/react" | |||
import { Box } from "@chakra-ui/react" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All the chakra imports need to be migrated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There isn't any particular Box component in the /ui/flex.tsx file, so I was confused about migrating this component. Should we use Flex to migrate the Box imports?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah! got it. A Box
in chakra is going to render a simple div
element.
// So, if you have
<Box mt={4}>
// should be migrated to
<div className="mt-4">
in cases where we are using motion
<Box as={motion.div}>
// should be migrated to
<motion.div>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I understand, I'll migrate those imports accordingly.
Additionally, I think it would be better to update the instructions to include this approach. This way, anyone needing to migrate the Box
component in the future can follow the same process we discussed.
…e.tsx-to-Shadcn/Tailwind
…e.tsx-to-Shadcn/Tailwind
…e.tsx-to-Shadcn/Tailwind
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool @ashiskumar-1999. There are a few more things to polish to finish this. I'll push some color adjustments.
Description
Migrated the
Chakra-UI
imports to theShadcn/Tailwind
#13946