Skip to content

Commit

Permalink
license
Browse files Browse the repository at this point in the history
  • Loading branch information
FaridSafi committed Jul 17, 2016
1 parent ea24d88 commit 7b270df
Show file tree
Hide file tree
Showing 5 changed files with 52 additions and 41 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
node_modules/
npm-debug.log
TODO.md
README.md
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -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.
33 changes: 1 addition & 32 deletions example/react-native-gifted-messenger/src/DefaultStyles.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
17 changes: 12 additions & 5 deletions example/react-native-gifted-messenger/src/components/Composer.js
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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,
Expand All @@ -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;
Original file line number Diff line number Diff line change
Expand Up @@ -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={() => {
Expand All @@ -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>
Expand Down

0 comments on commit 7b270df

Please sign in to comment.