Skip to content

Commit 022e403

Browse files
committed
[Dashboard] Remove MenuItem from tw-components (#5339)
## Problem solved Short description of the bug fixed or feature added <!-- start pr-codex --> --- ## PR-Codex overview This PR primarily focuses on the removal of the `MenuItem` component from various files and updates related to `buttonSizesMap` and `PossibleButtonSize` type definitions. ### Detailed summary - Deleted `MenuItem` export from `tw-components/menu.tsx`. - Removed `MenuItem` import from `tw-components` in `DowngradeDialog.tsx` and `claim-conditions-form/index.tsx`. - Changed `export const buttonSizesMap` to `const buttonSizesMap` in `button.tsx`. - Updated `export type PossibleButtonSize` to `type PossibleButtonSize` in `button.tsx`. > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` <!-- end pr-codex -->
1 parent ea2815d commit 022e403

File tree

6 files changed

+6
-45
lines changed

6 files changed

+6
-45
lines changed

apps/dashboard/.eslintrc.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ module.exports = {
5959
"FormHelperText",
6060
"FormErrorMessage",
6161
"MenuGroup",
62-
"MenuItem",
6362
"VStack",
6463
"HStack",
6564
"AspectRatio",

apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/[contractAddress]/_components/claim-conditions/claim-conditions-form/index.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import {
1313
Flex,
1414
Menu,
1515
MenuButton,
16+
MenuItem,
1617
MenuList,
1718
} from "@chakra-ui/react";
1819
import { TransactionButton } from "components/buttons/TransactionButton";
@@ -39,7 +40,7 @@ import {
3940
useSendAndConfirmTransaction,
4041
} from "thirdweb/react";
4142
import invariant from "tiny-invariant";
42-
import { Button, Heading, MenuItem, Text } from "tw-components";
43+
import { Button, Heading, Text } from "tw-components";
4344
import * as z from "zod";
4445
import { ZodError } from "zod";
4546
import {

apps/dashboard/src/components/settings/Account/Billing/DowngradeDialog.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,13 @@ import {
88
Flex,
99
Menu,
1010
MenuButton,
11+
MenuItem,
1112
MenuList,
1213
Textarea,
1314
} from "@chakra-ui/react";
1415
import { ChevronDownIcon, XIcon } from "lucide-react";
1516
import { useRef, useState } from "react";
16-
import { Button, MenuItem, Text } from "tw-components";
17+
import { Button, Text } from "tw-components";
1718

1819
const DOWNGRADE_OPTIONS = {
1920
customer_service: "Not happy with customer service",

apps/dashboard/src/tw-components/button.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,14 @@ import { fontWeights, letterSpacings, lineHeights } from "theme/typography";
1616
import { ChakraNextLink } from "./link";
1717
import { convertFontSizeToCSSVar } from "./utils/typography";
1818

19-
export const buttonSizesMap = {
19+
const buttonSizesMap = {
2020
xs: "sm",
2121
sm: "md",
2222
md: "lg",
2323
lg: "xl",
2424
} as const;
2525

26-
export type PossibleButtonSize = keyof typeof buttonSizesMap;
26+
type PossibleButtonSize = keyof typeof buttonSizesMap;
2727

2828
export interface ButtonProps extends Omit<ChakraButtonProps, "size"> {
2929
size?: PossibleButtonSize;

apps/dashboard/src/tw-components/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,4 @@ export * from "./drawer";
77
export * from "./form";
88
export * from "./heading";
99
export * from "./link";
10-
export * from "./menu";
1110
export * from "./text";

apps/dashboard/src/tw-components/menu.tsx

Lines changed: 0 additions & 39 deletions
This file was deleted.

0 commit comments

Comments
 (0)