fix: cleaned up sendMessageStyle arguments

pull/2796/head
William Grant 2 years ago
parent 1f1bb702c3
commit 266a0d6964

@ -117,7 +117,7 @@ interface State {
htmlDirection?: HTMLDirection; htmlDirection?: HTMLDirection;
} }
const sendMessageStyle = (dir: HTMLDirection) => { const sendMessageStyle = (dir?: HTMLDirection) => {
return { return {
control: { control: {
wordBreak: 'break-all', wordBreak: 'break-all',
@ -497,7 +497,7 @@ class CompositionBoxInner extends React.Component<Props, State> {
const { typingEnabled } = this.props; const { typingEnabled } = this.props;
const neverMatchingRegex = /($a)/; const neverMatchingRegex = /($a)/;
const style = sendMessageStyle(htmlDirection || 'ltr'); const style = sendMessageStyle(htmlDirection);
return ( return (
<MentionsInput <MentionsInput

@ -5,7 +5,7 @@ import { HTMLDirection } from '../../../util/i18n';
const listRTLStyle = { position: 'absolute', bottom: '0px', right: '100%' }; const listRTLStyle = { position: 'absolute', bottom: '0px', right: '100%' };
export const styleForCompositionBoxSuggestions = (dir: HTMLDirection) => { export const styleForCompositionBoxSuggestions = (dir: HTMLDirection = 'ltr') => {
const styles = { const styles = {
suggestions: { suggestions: {
list: { list: {

Loading…
Cancel
Save