Skip to content

Commit

Permalink
chore: clean up #757
Browse files Browse the repository at this point in the history
  • Loading branch information
davydocsurg committed Dec 20, 2023
1 parent f3deb23 commit 6f54cf7
Show file tree
Hide file tree
Showing 8 changed files with 28 additions and 377 deletions.
100 changes: 0 additions & 100 deletions src/dictionaries/seed.js

This file was deleted.

29 changes: 0 additions & 29 deletions src/middleware/authorization.js

This file was deleted.

117 changes: 0 additions & 117 deletions src/pages/about.js

This file was deleted.

35 changes: 28 additions & 7 deletions src/pages/components/Sidebar/SidebarItem.tsx
Original file line number Diff line number Diff line change
@@ -1,19 +1,36 @@
import React from 'react';
import { Box, Flex } from '@chakra-ui/react';
import { Box, Flex, FlexProps } from '@chakra-ui/react';

interface IconType {
size?: string | number | boolean;
}

interface SidebarItemProps {
interface SidebarItemProps extends FlexProps {
icon: React.ReactElement<IconType>;
href: string;
children: React.ReactNode;
activeBgColor?: string;
activeTextColor?: string;
_active?: {
bg: string;
};
_hover?: {
bg?: string;
color?: string;
};
mb?: number;
}

const SidebarItem = ({ icon, href, children, activeBgColor, activeTextColor }: SidebarItemProps) => (
const SidebarItem = ({
icon,
href,
children,
activeBgColor,
activeTextColor,
_active,
_hover,
mb,
}: SidebarItemProps) => (
<Box as="a" href={href} style={{ textDecoration: 'none' }} _focus={{ boxShadow: 'none' }}>
<Flex
align="center"
Expand All @@ -22,12 +39,16 @@ const SidebarItem = ({ icon, href, children, activeBgColor, activeTextColor }: S
borderRadius="lg"
role="group"
cursor="pointer"
_hover={{
bg: 'cyan.400',
color: 'white',
}}
_hover={
_hover && {
bg: 'cyan.400',
color: 'white',
}
}
_active={_active}
bg={activeBgColor}
color={activeTextColor}
mb={mb}
>
{icon}
{children}
Expand Down
Loading

0 comments on commit 6f54cf7

Please sign in to comment.