Skip to content

Commit

Permalink
Merge pull request #250 from Team-Lecue/refactor/Detail
Browse files Browse the repository at this point in the history
[ Merge ] 데브 머지 데브 머야~
  • Loading branch information
jungwoo3490 authored Feb 22, 2024
2 parents 722d8d4 + a086f3b commit c7d62bc
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export const LecueNoteModalWrapper = styled.div<{
return `background: url(${noteBackground})`;
}
}};
background-size: cover;
background-size: 31.1rem 35.8rem;
color: ${({ noteTextColor }) => {
return noteTextColor;
}};
Expand Down
5 changes: 1 addition & 4 deletions src/Detail/components/LecueNoteModal/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,7 @@ interface LecueNoteModalProps {
}

function LecueNoteModal({ selectedNote, closeModal }: LecueNoteModalProps) {
const handleCloseButtonClick = (
event: React.MouseEvent<HTMLButtonElement>,
) => {
event.stopPropagation();
const handleCloseButtonClick = () => {
closeModal();
};
return createPortal(
Expand Down
28 changes: 15 additions & 13 deletions src/Detail/components/SmallLecueNote/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { useState } from 'react';
import React, { useState } from 'react';

import { NoteType } from '../../type/lecueBookType';
import LecueNoteModal from '../LecueNoteModal';
Expand Down Expand Up @@ -38,24 +38,26 @@ function SmallLecueNote({
};

return (
<S.SmallLecueNoteWrapper
renderType={renderType}
noteTextColor={noteTextColor}
noteBackground={noteBackground}
onClick={handleClickSmallLecueNote}
>
<S.SmallLecueNoteNickName>{noteNickname}</S.SmallLecueNoteNickName>
<S.SmallLecueNoteContentWrapper>
<S.SmallLecueNoteContent>{content}</S.SmallLecueNoteContent>
</S.SmallLecueNoteContentWrapper>
<S.SmallLecueNoteDate>{noteDate}</S.SmallLecueNoteDate>
<React.Fragment>
{modalShow && (
<LecueNoteModal
selectedNote={getClickedNote()[0]}
closeModal={() => setModalShow(false)}
/>
)}
</S.SmallLecueNoteWrapper>
<S.SmallLecueNoteWrapper
renderType={renderType}
noteTextColor={noteTextColor}
noteBackground={noteBackground}
onClick={handleClickSmallLecueNote}
>
<S.SmallLecueNoteNickName>{noteNickname}</S.SmallLecueNoteNickName>
<S.SmallLecueNoteContentWrapper>
<S.SmallLecueNoteContent>{content}</S.SmallLecueNoteContent>
</S.SmallLecueNoteContentWrapper>
<S.SmallLecueNoteDate>{noteDate}</S.SmallLecueNoteDate>
</S.SmallLecueNoteWrapper>
</React.Fragment>
);
}

Expand Down

0 comments on commit c7d62bc

Please sign in to comment.