-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #17 from LiuXianJing/dev
Dev
- Loading branch information
Showing
17 changed files
with
130 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
.multifunctional-input-container { | ||
width: 100%; | ||
height: 100%; | ||
position: relative; | ||
.message-textarea { | ||
width: 90%; | ||
height: 36px; | ||
padding: 10px 10px 4px 10px; | ||
border: 1px solid #ebe7e7; | ||
border-radius: 10px 10px 0 0; | ||
outline: none; | ||
resize: none; | ||
&::-webkit-input-placeholder { | ||
font-size: 16px; | ||
color: #7a7a80; | ||
font-weight: bold; | ||
} | ||
&::-webkit-scrollbar { | ||
width: 2px; | ||
} | ||
} | ||
.other-file-input { | ||
width: 90%; | ||
padding: 0px 12px 0px 10px; | ||
position: absolute; | ||
top: 50px; | ||
border-radius: 0 0 10px 10px; | ||
background-color: #fff; | ||
.item { | ||
display: inline-flex; | ||
width: 32px; | ||
margin-right: 2%; | ||
cursor: pointer; | ||
&:first-child { | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
import { ChangeEvent, useEffect } from 'react'; | ||
import { AudioTwoTone, FileTwoTone, PictureTwoTone, VideoCameraTwoTone } from '@ant-design/icons'; | ||
import './index.less' | ||
|
||
interface IProps { | ||
style?: Record<string, any>; | ||
changeEnterMessage: (value: string) => void; | ||
} | ||
|
||
const iconFontsize = 22 | ||
|
||
const MultifunctionalInput = (props: IProps) => { | ||
|
||
const { style, changeEnterMessage, } = props; | ||
|
||
useEffect(() => { | ||
}, []) | ||
|
||
const onChangeEnterMessage = (e: ChangeEvent<HTMLTextAreaElement>) => { | ||
const { value, } = e.target; | ||
changeEnterMessage?.(value) | ||
} | ||
|
||
return <div | ||
className='multifunctional-input-container' | ||
style={style} | ||
> | ||
<textarea | ||
className='message-textarea' | ||
placeholder='Please enter your message' | ||
onChange={onChangeEnterMessage} | ||
/> | ||
<div className="other-file-input"> | ||
<span className='item'> | ||
<PictureTwoTone style={{fontSize: iconFontsize}} /> | ||
</span> | ||
<span className='item'> | ||
<AudioTwoTone style={{fontSize: iconFontsize}} /> | ||
</span> | ||
<span className='item'> | ||
<VideoCameraTwoTone style={{fontSize: iconFontsize}} /> | ||
</span> | ||
<span className='item'> | ||
<FileTwoTone style={{fontSize: iconFontsize}} /> | ||
</span> | ||
</div> | ||
</div> | ||
} | ||
|
||
export default MultifunctionalInput; |