Skip to content

Commit

Permalink
Merge pull request #9 from gdsc-ssu/dev
Browse files Browse the repository at this point in the history
fix: ui bug of modal
  • Loading branch information
Jun99uu authored Oct 14, 2023
2 parents 3b1f1a2 + cab917a commit a5b3b64
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 5 deletions.
9 changes: 8 additions & 1 deletion client/src/components/Modal/Confrim/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { ComponentProps } from 'react';
import { ModalButton, Message, ModalContent, Title } from '../common';
import { css } from '@emotion/react';

interface ModalProps extends ComponentProps<'button'> {
/**
Expand All @@ -17,9 +18,15 @@ const ConfirmModal = ({ title, message, ...props }: ModalProps) => {
<ModalContent>
<Title>{title}</Title>
<Message>{message}</Message>
<ModalButton {...props}>확인</ModalButton>
<ModalButton css={buttonStyle} {...props}>
확인
</ModalButton>
</ModalContent>
);
};

const buttonStyle = css`
width: 20rem;
`;

export default ConfirmModal;
11 changes: 9 additions & 2 deletions client/src/components/Modal/Decision/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,12 @@ const DecisionModal = ({ title, message, onCancle, ...props }: ModalProps) => {
<Title>{title}</Title>
<Message>{message}</Message>
<ButtonsWrapper>
<ModalButton css={closeStyle} onClick={onCancle}>
<ModalButton css={[closeStyle, commonStyle]} onClick={onCancle}>
닫기
</ModalButton>
<ModalButton {...props}>확인</ModalButton>
<ModalButton css={commonStyle} {...props}>
확인
</ModalButton>
</ButtonsWrapper>
</ModalContent>
);
Expand All @@ -41,6 +43,11 @@ const ButtonsWrapper = styled.div`
${flex('row', 'center', 'center', 0.8)};
`;

const commonStyle = css`
flex: 1;
max-width: 20rem;
`;

const closeStyle = css`
background-color: ${COLORS.disabled};
color: white;
Expand Down
3 changes: 1 addition & 2 deletions client/src/components/Modal/common.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,8 @@ export const ModalButton = styled.button`
background-color: ${COLORS.primary};
color: ${COLORS.white};
border-radius: 50rem;
flex: 1;
height: 3.2rem;
max-width: 20rem;
${TYPO.text2.Md};
position: relative;
Expand Down

0 comments on commit a5b3b64

Please sign in to comment.