-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(panel): fix circular dependency error
- Loading branch information
1 parent
2209697
commit d818901
Showing
5 changed files
with
37 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { DrawerProps } from "@mui/material"; | ||
import { PanelHeaderCloseProps } from "./components/PanelHeaderClose"; | ||
|
||
export interface BasicPanelProps extends Omit<DrawerProps, "variant"> { | ||
sdsType: "basic"; // Discriminator | ||
position?: "left" | "right"; | ||
width?: number | string; | ||
} | ||
|
||
export interface OverlayPanelProps extends Omit<DrawerProps, "variant"> { | ||
sdsType: "overlay"; // Discriminator | ||
position?: "left" | "right" | "bottom"; | ||
width?: number | string; | ||
HeaderComponent?: React.ReactNode; | ||
closeButtonOnClick?: PanelHeaderCloseProps["onClick"]; | ||
CloseButtonComponent?: PanelHeaderCloseProps["CloseButtonComponent"]; | ||
} | ||
|
||
// Discriminated Union | ||
export type PanelProps = BasicPanelProps | OverlayPanelProps; | ||
|
||
export const PANEL_BASIC_MIN_WIDTH_PX = 240; | ||
export const PANEL_OVERLAY_MIN_WIDTH_PX = 320; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters