mirror of
https://github.com/ecency/ecency-mobile.git
synced 2024-12-26 23:05:00 +03:00
assigned with isPreview status
This commit is contained in:
parent
92274d0cf2
commit
a3b4d9a2fd
@ -60,7 +60,7 @@ export default class TagAreaView extends Component {
|
||||
};
|
||||
|
||||
render() {
|
||||
const { chipsData } = this.props;
|
||||
const { chipsData, isPreviewActive } = this.props;
|
||||
const { chips } = this.state;
|
||||
|
||||
return (
|
||||
@ -74,7 +74,7 @@ export default class TagAreaView extends Component {
|
||||
}}
|
||||
isPin={i === 0 && chips[1]}
|
||||
placeholderTextColor="#fff"
|
||||
editable={!chipsData}
|
||||
editable={!isPreviewActive}
|
||||
maxLength={50}
|
||||
placeholder="tags"
|
||||
autoFocus={i !== 0 && chips.length - 1 === i}
|
||||
|
@ -24,14 +24,14 @@ export default class TitleAreaView extends Component {
|
||||
// Component Functions
|
||||
|
||||
render() {
|
||||
const { onChange, value } = this.props;
|
||||
const { onChange, value, isPreviewActive } = this.props;
|
||||
|
||||
return (
|
||||
<View style={globalStyles.containerHorizontal16}>
|
||||
<TextInput
|
||||
style={styles.textInput}
|
||||
placeholderTextColor="c1c5c7"
|
||||
editable
|
||||
editable={!isPreviewActive}
|
||||
maxLength={250}
|
||||
placeholder="Title"
|
||||
multiline
|
||||
|
@ -13,7 +13,7 @@ class PostFormView extends Component {
|
||||
};
|
||||
|
||||
render() {
|
||||
const { children, isFormValid } = this.props;
|
||||
const { children, isFormValid, isPreviewActive } = this.props;
|
||||
|
||||
return (
|
||||
<Fragment>
|
||||
@ -22,6 +22,7 @@ class PostFormView extends Component {
|
||||
return React.cloneElement(child, {
|
||||
onSubmitEditing: item => this._handleOnSubmitEditing(child.props.returnKeyType, item),
|
||||
returnKeyType: isFormValid ? 'done' : 'next',
|
||||
isPreviewActive,
|
||||
});
|
||||
}
|
||||
})}
|
||||
|
@ -63,12 +63,9 @@ export class EditorScreen extends Component {
|
||||
isPreviewActive={isPreviewActive}
|
||||
isFormValid
|
||||
>
|
||||
<TitleArea isPreviewActive={isPreviewActive} />
|
||||
<TagArea isPreviewActive={isPreviewActive} />
|
||||
<TextArea
|
||||
handleOnTextChange={this._handleOnTextChange}
|
||||
isPreviewActive={isPreviewActive}
|
||||
/>
|
||||
<TitleArea />
|
||||
<TagArea />
|
||||
<TextArea handleOnTextChange={this._handleOnTextChange} />
|
||||
</PostForm>
|
||||
</View>
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user