Skip to content

Commit

Permalink
[RC] fix: MiniDrawer props
Browse files Browse the repository at this point in the history
  • Loading branch information
AgustinMJ committed Sep 2, 2024
1 parent 613622b commit a84b2b5
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/genesys/packages/react-components/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@peersyst/react-components",
"author": "Peersyst",
"version": "3.9.36",
"version": "3.9.37",
"license": "MIT",
"main": "./src/index.tsx",
"engines": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ function formatSize(v: number | string): string {
return typeof v === "string" ? v : v + "px";
}

export const MiniDrawerRoot = styled(Drawer).attrs({ variant: "permanent" })<MiniDrawerRootProps>(
export const MiniDrawerRoot = styled(Drawer)<MiniDrawerRootProps>(
({
size: { size = 300, mobileSize: mobileSizeProp } = {},
position,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,13 @@ const MiniDrawer = (props: MiniDrawerProps): JSX.Element => {
className,
size = { size: 300 },
transitionDuration = "300ms",
variant = "permanent",
...rest
} = useMergeDefaultProps("MiniDrawer", props);

return (
<MiniDrawerRoot
variant={variant}
expanded={expanded}
collapsedSize={collapsedSize}
transitionDuration={transitionDuration}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
import { DrawerPosition, DrawerProps } from "../Drawer";

export interface MiniDrawerProps
extends Pick<DrawerProps, "size" | "className" | "style" | "children" | "position"> {
extends Omit<
DrawerProps,
"defaultOpen" | "open" | "onClose" | "onExited" | "transitionsDuration"
> {
/**
* Controls MiniDrawers' expanded state
*/
Expand Down

0 comments on commit a84b2b5

Please sign in to comment.