Skip to content

Commit

Permalink
chore: remove unused component and deps
Browse files Browse the repository at this point in the history
  • Loading branch information
gndz07 committed Oct 22, 2024
1 parent 218b934 commit a4695ae
Show file tree
Hide file tree
Showing 5 changed files with 56 additions and 125 deletions.
2 changes: 1 addition & 1 deletion components/DropdownMenu/DropdownMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import React from 'react';
import { CSS, styled } from '../../stitches.config';
import { Box } from '../Box';
import { Flex } from '../Flex';
import { itemCss, labelCss, menuCss, separatorCss } from '../Menu';
import { panelStyles } from '../Panel';
import { itemCss, labelCss, menuCss, separatorCss } from './styles';

export const DropdownMenu = DropdownMenuPrimitive.Root;
export const DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
Expand Down
54 changes: 54 additions & 0 deletions components/DropdownMenu/styles.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
import { css } from '../../stitches.config';
import { elevationVariants } from '../Elevation';

export const baseItemCss = css({
display: 'flex',
alignItems: 'center',
justifyContent: 'space-between',
fontFamily: '$rubik',
fontSize: '$1',
fontVariantNumeric: 'tabular-nums',
lineHeight: '1',
cursor: 'default',
userSelect: 'none',
whiteSpace: 'nowrap',
height: '$5',
px: '$5',
});

export const itemCss = css(baseItemCss, {
position: 'relative',
color: '$hiContrast',

'&:focus': {
outline: 'none',
backgroundColor: '$blue9',
color: 'white',
},

'&[data-disabled]': {
color: '$slate9',
},
});

export const labelCss = css(baseItemCss, {
color: '$slate11',
});

export const menuCss = css({
boxSizing: 'border-box',
minWidth: 120,
py: '$1',
variants: {
elevation: elevationVariants,
},
defaultVariants: {
elevation: 2,
},
});

export const separatorCss = css({
height: 1,
my: '$1',
backgroundColor: '$slate6',
});
121 changes: 0 additions & 121 deletions components/Menu.tsx

This file was deleted.

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@
"@radix-ui/react-icons": "^1.1.1",
"@radix-ui/react-id": "^1.0.0",
"@radix-ui/react-label": "^2.0.0",
"@radix-ui/react-menu": "^2.0.1",
"@radix-ui/react-navigation-menu": "^1.2.0",
"@radix-ui/react-popover": "^1.0.2",
"@radix-ui/react-portal": "^1.0.1",
Expand Down
3 changes: 1 addition & 2 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4543,7 +4543,7 @@ __metadata:
languageName: node
linkType: hard

"@radix-ui/react-menu@npm:2.0.6, @radix-ui/react-menu@npm:^2.0.1":
"@radix-ui/react-menu@npm:2.0.6":
version: 2.0.6
resolution: "@radix-ui/react-menu@npm:2.0.6"
dependencies:
Expand Down Expand Up @@ -6196,7 +6196,6 @@ __metadata:
"@radix-ui/react-icons": "npm:^1.1.1"
"@radix-ui/react-id": "npm:^1.0.0"
"@radix-ui/react-label": "npm:^2.0.0"
"@radix-ui/react-menu": "npm:^2.0.1"
"@radix-ui/react-navigation-menu": "npm:^1.2.0"
"@radix-ui/react-popover": "npm:^1.0.2"
"@radix-ui/react-portal": "npm:^1.0.1"
Expand Down

0 comments on commit a4695ae

Please sign in to comment.