Skip to content

Commit

Permalink
fix: Dialog, Modal and Popover (#1245)
Browse files Browse the repository at this point in the history
  • Loading branch information
danielsimao authored May 31, 2023
1 parent aca4e7d commit 252285f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/component-library/Dialog/Dialog.style.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ const StyledDialog = styled.section<StyledDialogProps>`
border: ${theme.border.default};
border-radius: ${theme.rounded.md};
color: ${theme.colors.textPrimary};
max-width: 100%;
width: ${({ $size }) => theme.dialog[$size].width};
display: flex;
flex-direction: column;
Expand Down
1 change: 1 addition & 0 deletions src/component-library/Modal/Modal.style.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ const StyledWrapper = styled.div<StyledModalProps>`
`;

const StyledModal = styled.div<StyledModalProps>`
max-width: calc(100% - ${theme.spacing.spacing12});
max-height: ${({ $isCentered }) => $isCentered && theme.modal.maxHeight};
margin: ${({ $isCentered }) => ($isCentered ? 0 : theme.spacing.spacing16)} ${theme.spacing.spacing6};
Expand Down
6 changes: 4 additions & 2 deletions src/component-library/Popover/Popover.style.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import styled from 'styled-components';

import { getOverlayPlacementCSS, overlayCSS } from '../css/overlay';
import { theme } from '../theme';
import { Placement } from '../utils/prop-types';

type StyledPopoverProps = {
Expand All @@ -13,8 +14,9 @@ const StyledPopover = styled.div<StyledPopoverProps>`
flex-direction: column;
box-sizing: border-box;
min-width: 32px;
min-height: 32px;
min-width: ${theme.spacing.spacing8};
min-height: ${theme.spacing.spacing8};
max-width: calc(100% - ${theme.spacing.spacing8});
position: absolute;
Expand Down

2 comments on commit 252285f

@vercel
Copy link

@vercel vercel bot commented on 252285f May 31, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vercel
Copy link

@vercel vercel bot commented on 252285f May 31, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.