Skip to content

Commit

Permalink
main 브랜치 병합
Browse files Browse the repository at this point in the history
  • Loading branch information
0Jaemin0 authored Nov 9, 2024
2 parents 64cac9e + cab1ec7 commit bdab70a
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 16 deletions.
3 changes: 2 additions & 1 deletion src/components/Chat/Chatting/Chatting.styled.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ export const ChattingInputContainer = styled.div`
border-radius: ${theme.units.radius.radius12};
display: flex;
flex-direction: column;
padding: ${theme.units.spacing.space12};
padding: ${theme.units.spacing.space12} ${theme.units.spacing.space8}
${theme.units.spacing.space6} ${theme.units.spacing.space8};
`;

export const ChattingInputWrapper = styled.textarea`
Expand Down
11 changes: 4 additions & 7 deletions src/components/Chat/Chatting/Chatting.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -316,13 +316,10 @@ const Chatting = (props: ChattingProps) => {
if (event.key === 'Enter' && event.shiftKey) {
event.preventDefault();
setChatMessage((prev) => `${prev}\n`);
} else if (
event.key === 'Enter' &&
!event.shiftKey &&
chatMessage.length > 0
) {
} else if (event.key === 'Enter' && !event.shiftKey) {
event.preventDefault();
handleText();

if (chatMessage.trim().length > 0) handleText();
}
};

Expand Down Expand Up @@ -481,7 +478,7 @@ const Chatting = (props: ChattingProps) => {
variant='primary'
size='sm'
isFull
disabled={chatMessage.length === 0}
disabled={chatMessage.trimStart().length === 0}
onClick={handleText}
/>
</Flex>
Expand Down
4 changes: 2 additions & 2 deletions src/components/Chat/MyMessageBox/MyMessageBox.styled.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export const MyMessageBoxContainer = styled.div`
display: flex;
width: 100%;
justify-content: flex-end;
padding-top: ${theme.units.spacing.space4};
padding: ${theme.units.spacing.space4};
gap: ${theme.units.spacing.space8};
`;

Expand All @@ -23,7 +23,7 @@ export const MyMessageBoxWrapper = styled.div<{ state: boolean; type: string }>`
max-width: 250px;
line-height: 18px;
word-break: break-all;
white-space: pre-line;
white-space: pre;
`;

export const ImageWrapper = styled.div`
Expand Down
2 changes: 1 addition & 1 deletion src/components/Chat/MyMessageBox/MyMessageBox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const MyMessageBox = (props: MyMessageBoxProps) => {
)}
<S.MyMessageBoxWrapper state={state} type={type}>
{type === 'TEXT' && (
<Text size='lg' weight='semiBold' color='iInverse'>
<Text size='lg' weight='medium' color='iInverse'>
{content}
</Text>
)}
Expand Down
11 changes: 8 additions & 3 deletions src/components/Chat/OtherMessageBox/OtherMessageBox.styled.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
import styled from 'styled-components';
import theme from '@styles/theme';

export const OtherMessageBoxContainer = styled.div`
export const OtherMessageBoxContainer = styled.div<{
state: boolean;
}>`
display: flex;
width: 100%;
padding-top: ${theme.units.spacing.space4};
padding: ${(props) =>
props.state
? `${theme.units.spacing.space12} ${theme.units.spacing.space4} ${theme.units.spacing.space4} ${theme.units.spacing.space4}`
: `${theme.units.spacing.space4}`};
gap: ${theme.units.spacing.space8};
`;

Expand All @@ -27,7 +32,7 @@ export const OtherMessageBoxWrapper = styled.div<{
max-width: 250px;
line-height: 18px;
word-break: break-all;
white-space: pre-line;
white-space: pre;
`;

export const ImageWrapper = styled.div`
Expand Down
4 changes: 2 additions & 2 deletions src/components/Chat/OtherMessageBox/OtherMessageBox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const OtherMessageBox = (props: OtherMessageBoxProps) => {
const { name, profile, type, content, date, file, state } = props;

return (
<S.OtherMessageBoxContainer>
<S.OtherMessageBoxContainer state={state}>
<Flex direction='column' width='32'>
{state && (
<Avatar profile={profile} initial={name} size='md' shape='circle' />
Expand All @@ -33,7 +33,7 @@ const OtherMessageBox = (props: OtherMessageBoxProps) => {
)}
<S.OtherMessageBoxWrapper state={state} type={type}>
{type === 'TEXT' && (
<Text size='lg' weight='semiBold' color='secondary'>
<Text size='lg' weight='medium' color='secondary'>
{content}
</Text>
)}
Expand Down

0 comments on commit bdab70a

Please sign in to comment.