Permalink
Browse files

license

  • Loading branch information...
FaridSafi committed Jul 17, 2016
1 parent ea24d88 commit 7b270dfbe96701c8f8ef786db1cea95b2264c9db
View
@@ -2,3 +2,4 @@
node_modules/
npm-debug.log
TODO.md
README.md
View
21 LICENSE
@@ -0,0 +1,21 @@
The MIT License (MIT)
Copyright (c) 2016 Farid from Safi
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
@@ -8,37 +8,6 @@ const toolbarInputStyles = {
minInputToolbarHeight: 55,
minComposerHeight: 35,
maxComposerHeight: 100,
Composer: {
textInput: {
flex: 1,
marginLeft: 10,
fontSize: 17,
},
},
};
/*
** Global styles
*/
// TODO to deprecate?
const globalStyles = {
NavBar: {
statusBar: {
backgroundColor: '#FFF',
},
navBar: {
backgroundColor: '#FFF',
},
title: {
color: '#000',
},
buttonText: {
color: '#000',
},
},
};
export default Object.assign({}, toolbarInputStyles, globalStyles);
export default Object.assign({}, toolbarInputStyles);
@@ -1,9 +1,10 @@
import React, { Component } from 'react';
import {
StyleSheet,
TextInput,
} from 'react-native';
class Composer extends Component {
export default class Composer extends Component {
render() {
return (
<TextInput
@@ -12,7 +13,7 @@ class Composer extends Component {
onChange={(e) => {
this.props.onChange(e);
}}
style={[this.props.customStyles.Composer.textInput, {
style={[styles.textInput, this.props.textInputStyle, {
height: this.props.composerHeight,
marginTop: (this.props.customStyles.minInputToolbarHeight - this.props.customStyles.minComposerHeight) / 2,
marginBottom: (this.props.customStyles.minInputToolbarHeight - this.props.customStyles.minComposerHeight) / 2,
@@ -24,12 +25,18 @@ class Composer extends Component {
}
}
const styles = StyleSheet.create({
textInput: {
flex: 1,
marginLeft: 10,
fontSize: 17,
},
});
Composer.defaultProps = {
customStyles: {},
textInputStyle: {},
onChange: () => {},
composerHeight: 35,
text: '',
placeholder: 'Type a message...',
};
export default Composer;
@@ -68,15 +68,26 @@ class Actions extends Component {
renderNavBar() {
return (
<NavBar style={this.props.customStyles.NavBar}>
<NavBar style={{
statusBar: {
backgroundColor: '#FFF',
},
navBar: {
backgroundColor: '#FFF',
},
}}>
<NavButton onPress={() => {
this.setModalVisible(false);
}}>
<NavButtonText style={this.props.customStyles.NavBar.buttonText}>
<NavButtonText style={{
color: '#000',
}}>
{'Cancel'}
</NavButtonText>
</NavButton>
<NavTitle style={this.props.customStyles.NavBar.title}>
<NavTitle style={{
color: '#000',
}}>
{'Camera Roll'}
</NavTitle>
<NavButton onPress={() => {
@@ -88,7 +99,9 @@ class Actions extends Component {
});
this.props.onSend(images);
}}>
<NavButtonText style={this.props.customStyles.NavBar.buttonText}>
<NavButtonText style={{
color: '#000',
}}>
{'Send'}
</NavButtonText>
</NavButton>

0 comments on commit 7b270df

Please sign in to comment.