mirror of
https://github.com/ecency/ecency-mobile.git
synced 2024-12-02 11:15:35 +03:00
created themeContainer fixed markdown placeholder issue
This commit is contained in:
parent
df07fc3be5
commit
bbc9a5de35
@ -13,6 +13,8 @@ import { PostBody } from '../../postElements';
|
||||
import { StickyBar } from '../../basicUIElements';
|
||||
import { TextInput } from '../../textInput';
|
||||
|
||||
import { ThemeContainer } from '../../../containers';
|
||||
|
||||
// Styles
|
||||
import styles from './markdownEditorStyles';
|
||||
|
||||
@ -201,22 +203,26 @@ export default class MarkdownEditorView extends Component {
|
||||
behavior={Platform.OS === 'ios' ? 'padding' : null}
|
||||
>
|
||||
{!isPreviewActive ? (
|
||||
<TextInput
|
||||
multiline
|
||||
onChangeText={this._changeText}
|
||||
onSelectionChange={this._handleOnSelectionChange}
|
||||
placeholder={intl.formatMessage({
|
||||
id: isReply ? 'editor.reply_placeholder' : 'editor.default_placeholder',
|
||||
})}
|
||||
placeholderTextColor="#c1c5c7"
|
||||
selection={selection}
|
||||
selectionColor="#357ce6"
|
||||
style={styles.textWrapper}
|
||||
underlineColorAndroid="transparent"
|
||||
value={text}
|
||||
innerRef={this.inputRef}
|
||||
editable={!isLoading}
|
||||
/>
|
||||
<ThemeContainer>
|
||||
{({ isDarkTheme }) => (
|
||||
<TextInput
|
||||
multiline
|
||||
onChangeText={this._changeText}
|
||||
onSelectionChange={this._handleOnSelectionChange}
|
||||
placeholder={intl.formatMessage({
|
||||
id: isReply ? 'editor.reply_placeholder' : 'editor.default_placeholder',
|
||||
})}
|
||||
placeholderTextColor={isDarkTheme ? '#526d91' : '#c1c5c7'}
|
||||
selection={selection}
|
||||
selectionColor="#357ce6"
|
||||
style={styles.textWrapper}
|
||||
underlineColorAndroid="transparent"
|
||||
value={text}
|
||||
innerRef={this.inputRef}
|
||||
editable={!isLoading}
|
||||
/>
|
||||
)}
|
||||
</ThemeContainer>
|
||||
) : (
|
||||
this._renderPreview()
|
||||
)}
|
||||
|
@ -5,6 +5,7 @@ import ProfileEditContainer from './profileEditContainer';
|
||||
import RedeemContainer from './redeemContainer';
|
||||
import SpinGameContainer from './spinGameContainer';
|
||||
import TransferContainer from './transferContainer';
|
||||
import ThemeContainer from './themeContainer';
|
||||
|
||||
export {
|
||||
InAppPurchaseContainer,
|
||||
@ -14,4 +15,5 @@ export {
|
||||
RedeemContainer,
|
||||
SpinGameContainer,
|
||||
TransferContainer,
|
||||
ThemeContainer,
|
||||
};
|
||||
|
18
src/containers/themeContainer.js
Normal file
18
src/containers/themeContainer.js
Normal file
@ -0,0 +1,18 @@
|
||||
/* eslint-disable no-unused-vars */
|
||||
import React from 'react';
|
||||
import { connect } from 'react-redux';
|
||||
|
||||
const ThemeContainer = ({ children, isDarkTheme }) => {
|
||||
return (
|
||||
children &&
|
||||
children({
|
||||
isDarkTheme,
|
||||
})
|
||||
);
|
||||
};
|
||||
|
||||
const mapStateToProps = state => ({
|
||||
isDarkTheme: state.application.isDarkTheme,
|
||||
});
|
||||
|
||||
export default connect(mapStateToProps)(ThemeContainer);
|
Loading…
Reference in New Issue
Block a user