Skip to content

Commit

Permalink
#3580 - Macro: Add possibility to expand "Select Attachment Points" M…
Browse files Browse the repository at this point in the history
…odal

add new icons, add expand functionality to modal window, change layout of Monomer Connections Modal to match new functionality
  • Loading branch information
Mariia_Khrustaleva(EPAM) authored and Mariia_Khrustaleva(EPAM) committed Nov 30, 2023
1 parent d7bf402 commit 0e46abc
Showing 1 changed file with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,11 @@ interface ModalProps {
showExpandButton?: boolean;
onClose: VoidFunction;
className?: string;
modalWidth?: string;
}
const StyledDialog = styled(Dialog)`
.MuiPaper-root {
min-width: 304px;
max-width: calc(min(1280px, 100%));
max-height: calc(min(980px, 100%));
}
`;

Expand Down Expand Up @@ -86,6 +85,7 @@ export const Modal = ({
showExpandButton = false,
onClose,
className,
modalWidth,
}: ModalProps) => {
const theme = useTheme();
const [expanded, setExpanded] = React.useState(false);
Expand All @@ -96,8 +96,12 @@ export const Modal = ({
background: theme.ketcher.color.background.primary,
borderRadius: '8px',
color: theme.ketcher.color.text.primary,
width: expanded ? '100%' : '350px',
height: expanded ? '100%' : undefined,
...(showExpandButton && {
width: expanded ? '100%' : modalWidth,
height: expanded ? '100%' : undefined,
maxWidth: 'calc(min(1280px, 100%))',
maxHeight: 'calc(min(980px, 100%))',
}),
},
}),
[
Expand Down

0 comments on commit 0e46abc

Please sign in to comment.