Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[1.0.3 / C-MYPAGE] 쪽지 보내기 모달 InputBase수정 #996

Merged
merged 1 commit into from
Feb 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion src/app/my-page/message/@detail/panel/MessageForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -130,12 +130,19 @@ const MessageForm = ({
id="message"
multiline
value={content}
placeholder="내용을 입력하세요"
placeholder={
disabled ? '채팅방이 삭제되었습니다' : '내용을 입력하세요'
}
onChange={(e) =>
setContent(e.target.value.slice(0, MAX_LENGTH))
}
onKeyDown={handleKeyDown}
disabled={disabled}
sx={{
'.MuiOutlinedInput-root.Mui-disabled': {
opacity: 1,
},
}}
/>
<Typography color={'text.assistive'} sx={style.messageLength}>
{content.length} / {MAX_LENGTH}
Expand Down
1 change: 1 addition & 0 deletions src/app/my-page/message/@list/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ const NewMessageButton = ({ openModal }: { openModal: () => void }) => {
variant={'contained'}
startIcon={<PlusIcon width={'1.25rem'} height={'1.25rem'} />}
style={style.pcSendButton}
TypographyProps={{ color: '#ffffff' }}
/>
</Stack>
)
Expand Down
10 changes: 9 additions & 1 deletion src/app/my-page/message/@list/panel/NewMessageForm.style.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { Theme } from '@mui/material'

export const form = {
padding: '1rem',
borderRadius: '0.25rem',
background: (theme: Theme) => theme.palette.background.tertiary,
}
Expand All @@ -15,4 +14,13 @@ export const input = {
fontWeight: (theme: Theme) => theme.typography.Caption.fontWeight,
lineHeight: (theme: Theme) => theme.typography.Caption.lineHeight,
},
'& .MuiOutlinedInput-notchedOutline': {
border: 'none',
},
'&.Mui-focused': {
'& .MuiOutlinedInput-notchedOutline': {
border: 'none',
},
},
overflow: 'scroll',
}
9 changes: 7 additions & 2 deletions src/app/my-page/message/@list/panel/NewMessageForm.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { FormEvent, useCallback, useState } from 'react'
import { Box, InputBase } from '@mui/material'
import { Box, TextField } from '@mui/material'
import useAxiosWithAuth from '@/api/config'
import useModal from '@/hook/useModal'
import { IMessageListData, IMessageTarget } from '@/types/IMessage'
Expand Down Expand Up @@ -83,12 +83,17 @@ const NewMessageForm = ({
<>
<form onSubmit={messageSubmitHandler} id={'new-message-form'}>
<Box sx={style.form}>
<InputBase
<TextField
multiline
fullWidth
placeholder="내용을 입력하세요."
value={content}
onChange={(e) => setContent(e.target.value)}
sx={style.input}
inputProps={{
minLength: 2,
maxLength: 300,
}}
/>
</Box>
</form>
Expand Down
2 changes: 1 addition & 1 deletion src/app/my-page/privacy/panel/PasswordChangeSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const PasswordChangeSection = () => {
sx={style.buttonStyleBase}
onClick={openModal}
>
<Typography variant="CaptionEmphasis" color="text.strong">
<Typography variant="CaptionEmphasis" color="#ffffff">
변경하기
</Typography>
</Button>
Expand Down
18 changes: 17 additions & 1 deletion src/app/panel/ExternalMessageModal.style.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,17 @@ export const inputBase = {
color: (theme: Theme) => theme.palette.text.normal,
WebkitTextFillColor: (theme: Theme) => theme.palette.text.normal,
},
'& .MuiOutlinedInput-notchedOutline': {
border: 'none',
},
'&.Mui-focused': {
'& .MuiOutlinedInput-notchedOutline': {
border: 'none',
},
},
}

export const form = {
padding: '1rem',
borderRadius: '0.25rem',
background: (theme: Theme) => theme.palette.background.tertiary,
}
Expand All @@ -42,4 +49,13 @@ export const input = {
fontWeight: (theme: Theme) => theme.typography.Caption.fontWeight,
lineHeight: (theme: Theme) => theme.typography.Caption.lineHeight,
},
'& .MuiOutlinedInput-notchedOutline': {
border: 'none',
},
'&.Mui-focused': {
'& .MuiOutlinedInput-notchedOutline': {
border: 'none',
},
},
overflow: 'scroll',
}
9 changes: 7 additions & 2 deletions src/app/panel/ExternalMessageModal.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { useState, ReactNode } from 'react'
import { Box, Stack, InputBase, Typography } from '@mui/material'
import { Box, Stack, InputBase, Typography, TextField } from '@mui/material'
import useAxiosWithAuth from '@/api/config'
import useModal from '@/hook/useModal'
import useToast from '@/states/useToast'
Expand Down Expand Up @@ -139,7 +139,7 @@ const ExternalMessageModal = ({
required: '내용을 입력해주세요.',
}}
render={({ field }) => (
<InputBase
<TextField
fullWidth
placeholder="내용을 입력하세요."
{...field}
Expand All @@ -148,6 +148,11 @@ const ExternalMessageModal = ({
field.onChange(e.target.value)
trigger('content')
}}
multiline
inputProps={{
minLength: 2,
maxLength: 300,
}}
/>
)}
/>
Expand Down
4 changes: 3 additions & 1 deletion src/app/teams/[id]/setting/panel/SettingTeamInfo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,9 @@ const SettingTeamJobs = ({ team, mutate }: ISettingTeamJobs) => {
type="button"
onClick={handleEditModal}
>
<Typography variant="Body2">저장</Typography>
<Typography variant="Body2" color="#ffffff">
저장
</Typography>
</Button>
</Stack>
<Stack
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ const TeamCompleteButton = ({
variant="contained"
onClick={openModal}
>
<Typography variant="Body2">완료하기</Typography>
<Typography variant="Body2" color="#ffffff">완료하기</Typography>
</Button>
</Stack>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ const TeamDisperseButton = ({ teamId, teamStatus }: ITeamDisperseButton) => {
variant="contained"
onClick={openModal}
>
<Typography variant="Body2">해산하기</Typography>
<Typography variant="Body2" color="#ffffff">해산하기</Typography>
</Button>
</Stack>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ const TeamQuitButton = ({ teamId, teamStatus }: ITeamQuitButton) => {
variant="contained"
onClick={openModal}
>
<Typography variant="Body2">팀 나가기</Typography>
<Typography variant="Body2" color="#ffffff">팀 나가기</Typography>
</Button>
</Stack>

Expand Down
Loading