Skip to content

Commit

Permalink
Merge pull request #143 from 2022-Winter-Bootcamp-Team-K/feat/#142-Te…
Browse files Browse the repository at this point in the history
…xtAlign

Feat/#142 text align
  • Loading branch information
minseok1015 authored Feb 1, 2023
2 parents 9938a2b + 2421d86 commit e9d5e1f
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 15 deletions.
1 change: 1 addition & 0 deletions src/component/DeleteBtn.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ const DelBtn = styled.button`
z-index: 10000;
right: ${props => props.right};
top: ${props => props.top};
color: black;
`;

export default function DeleteBtn({ onClick, right, top }) {
Expand Down
26 changes: 15 additions & 11 deletions src/page/RollingPaper/RollingMemo.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,17 +55,17 @@ export default function App({ list, isAdmin, HandleMemoDelete }) {
position: 'absolute',
}}
>
{isAdmin ? (
<DeleteBtn
right="5%"
onClick={() => {
HandleMemoDelete(memo_id);
}}
/>
) : (
<div />
)}
<MemoText font={font} font_color={font_color}>
{isAdmin ? (
<DeleteBtn
right="5%"
onClick={() => {
HandleMemoDelete(memo_id);
}}
/>
) : (
<div />
)}
{content}
</MemoText>
<Name color={color}>
Expand Down Expand Up @@ -94,10 +94,14 @@ const MemoBox = styled.div`

const MemoText = styled.div`
width: 170px;
height: 170px;
display: flex;
justify-content: center;
align-items: center;
word-break: break-all;
font-size: 1.2rem;
color: ${props => props.font_color};
font-family: ${props => props.font};
font-size: 1.2rem;
`;

const Name = styled.div`
Expand Down
13 changes: 9 additions & 4 deletions src/page/RollingPaper/newMemo.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@ export default function newMemo({ list, setCoor, setMemoData }) {
position: 'absolute',
}}
>
<MemoText font={font} color={font_color}>
<MemoText font={font} font_color={font_color}>
{content}
</MemoText>
<Name>
<Name color={color}>
<b>from.</b>
{nickname}{' '}
</Name>
Expand All @@ -60,7 +60,6 @@ export default function newMemo({ list, setCoor, setMemoData }) {
const MemoBox = styled.div`
padding: 0.4rem;
width: 184px;
font-size: 1.2rem;
height: 174px;
background: ${props => props.background};
border-radius: 15px;
Expand All @@ -75,12 +74,18 @@ const MemoBox = styled.div`

const MemoText = styled.div`
width: 170px;
height: 170px;
display: flex;
justify-content: center;
align-items: center;
word-break: break-all;
color: ${props => props.color};
color: ${props => props.font_color};
font-family: ${props => props.font};
font-size: 1.2rem;
`;

const Name = styled.div`
text-align: right;
align-items: end;
color: ${props => (props.color === 'white' ? 'black' : 'white')};
`;

0 comments on commit e9d5e1f

Please sign in to comment.