Skip to content

Commit

Permalink
Use normal Button instead of FeedbackButton
Browse files Browse the repository at this point in the history
The loading behavior is now built-in: mui/material-ui#44637.
  • Loading branch information
johnnyomair committed Jan 16, 2025
1 parent 32cf156 commit fc6f338
Show file tree
Hide file tree
Showing 4 changed files with 166 additions and 114 deletions.
1 change: 0 additions & 1 deletion packages/admin/admin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
"dependencies": {
"@comet/admin-icons": "workspace:^7.11.0",
"@comet/admin-theme": "workspace:^7.11.0",
"@mui/lab": "^6.0.0-beta.23",
"exceljs": "^4.4.0",
"file-saver": "^2.0.5",
"final-form-set-field-data": "^1.0.2",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { ThreeDotSaving } from "@comet/admin-icons";
import { LoadingButton } from "@mui/lab";
import { ButtonClassKey, ButtonProps, ComponentsOverrides } from "@mui/material";
import { Button, ButtonClassKey, ButtonProps, ComponentsOverrides } from "@mui/material";
import { Theme, useThemeProps } from "@mui/material/styles";
import { ReactNode, useEffect, useState } from "react";
import { FormattedMessage } from "react-intl";
Expand All @@ -13,7 +12,7 @@ export type FeedbackButtonClassKey = "idle" | "loading" | "success" | "error" |

type OwnerState = { displayState: FeedbackButtonDisplayState };

const Root = createComponentSlot(LoadingButton)<FeedbackButtonClassKey, OwnerState>({
const Root = createComponentSlot(Button)<FeedbackButtonClassKey, OwnerState>({
componentName: "FeedbackButton",
slotName: "root",
classesResolver(ownerState) {
Expand All @@ -33,7 +32,7 @@ const Tooltip = createComponentSlot(CometTooltip)<FeedbackButtonClassKey>({

export interface FeedbackButtonProps
extends ThemedComponentBaseProps<{
root: typeof LoadingButton;
root: typeof Button;
tooltip: typeof CometTooltip;
}>,
Omit<ButtonProps, "loading"> {
Expand Down
Loading

0 comments on commit fc6f338

Please sign in to comment.