Skip to content

Commit e804e84

Browse files
Merge branch 'master' into fix/clickevent
2 parents ac7c567 + 4aad9f7 commit e804e84

File tree

3 files changed

+35
-3
lines changed

3 files changed

+35
-3
lines changed

src/custom/Markdown/style.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ export const StyledMarkdown = styled('a')(({ theme }) => ({
1212

1313
export const StyledMarkdownP = styled('p')(({ theme }) => ({
1414
color: theme.palette.text.default,
15+
marginBlock: '0px',
1516
...theme.typography.textB1Regular
1617
}));
1718

@@ -61,10 +62,12 @@ export const StyledMarkdownLi = styled('li')(({ theme }) => ({
6162

6263
export const StyledMarkdownTh = styled('th')(({ theme }) => ({
6364
color: theme.palette.text.default,
64-
...theme.typography.textH3Medium
65+
...theme.typography.textH3Medium,
66+
marginBlock: '0px'
6567
}));
6668

6769
export const StyledMarkdownTd = styled('td')(({ theme }) => ({
6870
color: theme.palette.text.default,
71+
marginBlock: '0px',
6972
...theme.typography.textB1Regular
7073
}));

src/custom/Modal/index.tsx

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { DialogProps, styled } from '@mui/material';
22
import React, { useRef, useState } from 'react';
3-
import { Dialog, IconButton, Paper, Typography } from '../../base';
3+
import { Box, Dialog, IconButton, Paper, Typography } from '../../base';
44
import { ContainedButton, OutlinedButton, TextButton } from '../../base/Button/Button';
55
import { iconLarge, iconMedium } from '../../constants/iconsSizes';
66
import { CloseIcon, InfoCircleIcon } from '../../icons';
@@ -172,7 +172,7 @@ export const ModalFooter: React.FC<ModalFooterProps> = ({ helpText, children, va
172172
};
173173

174174
// ModalButtonPrimary
175-
export const ModalButtonPrimary: React.FC = styled(ContainedButton)(({ theme }) => ({
175+
export const ModalButtonPrimary = styled(ContainedButton)(({ theme }) => ({
176176
backgroundColor: theme.palette.background.brand?.default,
177177
color: theme.palette.text.constant?.white,
178178
'&:hover': {
@@ -215,3 +215,31 @@ export const ModalButtonDanger = styled(ContainedButton)(({ theme }) => ({
215215
background: theme.palette.background.error?.hover
216216
}
217217
}));
218+
219+
const ButtonContainer = styled(Box)(() => ({
220+
width: '100%',
221+
display: 'flex',
222+
justifyContent: 'end',
223+
gap: '1rem'
224+
}));
225+
226+
interface PrimaryActionButtonsProps {
227+
primaryText: string;
228+
secondaryText: string;
229+
primaryButtonProps?: React.ComponentProps<typeof ModalButtonPrimary>;
230+
secondaryButtonProps?: React.ComponentProps<typeof ModalButtonSecondary>;
231+
}
232+
233+
export const PrimaryActionButtons: React.FC<PrimaryActionButtonsProps> = ({
234+
primaryText,
235+
secondaryText,
236+
primaryButtonProps,
237+
secondaryButtonProps
238+
}) => {
239+
return (
240+
<ButtonContainer>
241+
<ModalButtonSecondary {...secondaryButtonProps}>{secondaryText}</ModalButtonSecondary>
242+
<ModalButtonPrimary {...primaryButtonProps}>{primaryText}</ModalButtonPrimary>
243+
</ButtonContainer>
244+
);
245+
};

src/custom/index.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ export {
8484
ModalButtonSecondary,
8585
ModalButtonTertiary,
8686
ModalFooter,
87+
PrimaryActionButtons,
8788
useModal
8889
} from './Modal';
8990

0 commit comments

Comments
 (0)