Skip to content

Commit 6f241b3

Browse files
authored
Add mobile styling for Dialog content (#614)
* Add mobile styling for Dialog content * Update the width for the dialog content
1 parent c2b4b8b commit 6f241b3

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

src/components/ConfirmationDialog/ConfirmationDialog.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ const ActionsWrapper = styled.div`
2323
display: flex;
2424
justify-content: flex-end;
2525
gap: ${props => props.theme.click.dialog.space.gap};
26+
@media (max-width: ${({ theme }) => theme.breakpoint.sizes.sm}) {
27+
flex-direction: column;
28+
}
2629
`;
2730

2831
const DialogContent = styled.div`

src/components/Dialog/Dialog.tsx

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ const DialogOverlay = styled(RadixDialog.Overlay)`
5858
const ContentArea = styled(RadixDialog.Content)`
5959
background: ${({ theme }) => theme.click.dialog.color.background.default};
6060
border-radius: ${({ theme }) => theme.click.dialog.radii.all};
61-
padding: ${({ theme }) => theme.click.dialog.space.y}
62-
${({ theme }) => theme.click.dialog.space.x};
61+
padding: ${({ theme }) =>
62+
`${theme.click.dialog.space.y} ${theme.click.dialog.space.x}`};
6363
box-shadow: ${({ theme }) => theme.click.dialog.shadow.default};
6464
border: 1px solid ${({ theme }) => theme.click.global.color.stroke.default};
6565
width: 75%;
@@ -72,6 +72,12 @@ const ContentArea = styled(RadixDialog.Content)`
7272
transform: translate(-50%, -50%);
7373
animation: ${contentShow} 150ms cubic-bezier(0.16, 1, 0.3, 1);
7474
outline: none;
75+
76+
@media (max-width: ${({ theme }) => theme.breakpoint.sizes.sm}) {
77+
max-height: 100%;
78+
border-radius: 0;
79+
width: 100%;
80+
}
7581
`;
7682

7783
const TitleArea = styled.div`

0 commit comments

Comments
 (0)