Skip to content

Commit

Permalink
新增inputToolbarStyle屬性以讓我們可以修改InputToolbar的container的style。
Browse files Browse the repository at this point in the history
雖然在下面的說明中:

FaridSafi#662 (comment)

有寫到可以使用containerStyle,但實際使用後發現,如果以此方式來指定InputToolbar的backgroundColor,會造成Send(發送按鈕)的部份會變高突出InputToolbar的高度。

這主要是因為containerStyle除了InputToolbar使用外,也會傳送給Send使用,而Send本來是透明背景且固定高度44,其高度高於MIN_COMPOSER_HEIGHT。

也就是說,Send的範圍本來就是突出於InputToolbar之外,只是原本是透明底所以看不出來,但現在若是指定一個顏色的話,就會明顯的被看出突出了。
  • Loading branch information
howg0924 committed Oct 16, 2021
1 parent 1e5944e commit 1aafd5a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/InputToolbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ export default class InputToolbar extends React.Component {

render() {
return (
<View style={[styles.container, this.props.containerStyle, { position: this.state.position }]}>
<View style={[styles.container, this.props.containerStyle, this.props.inputToolbarStyle, { position: this.state.position }]}>
<View style={[styles.primary, this.props.primaryStyle, { height: this.props.composerHeight }]}>
{this.renderActions()}
{this.renderComposer()}
Expand Down

0 comments on commit 1aafd5a

Please sign in to comment.