Skip to content

Commit

Permalink
fix inconsistent line ending style.
Browse files Browse the repository at this point in the history
  • Loading branch information
aaray committed Sep 11, 2016
1 parent 04ad779 commit f76c9c4
Show file tree
Hide file tree
Showing 5 changed files with 1,098 additions and 1,098 deletions.
118 changes: 59 additions & 59 deletions Components/Widgets/Badge.js
@@ -1,59 +1,59 @@
/* @flow */
'use strict';

import React from 'react';
import {View} from 'react-native';
import NativeBaseComponent from '../Base/NativeBaseComponent';
import computeProps from '../../Utils/computeProps';
import Text from './Text';


export default class BadgeNB extends NativeBaseComponent {

propTypes: {
style : React.PropTypes.object
}

prepareRootProps() {

var type = {

backgroundColor:this.props.primary ?
this.getTheme().brandPrimary :
this.props.success ?
this.getTheme().brandSuccess :
this.props.info ?
this.getTheme().brandInfo :
this.props.warning ?
this.getTheme().brandWarning :
this.props.danger ?
this.getTheme().brandDanger :
this.getTheme().badgeBg,
padding: 3,
paddingHorizontal: 10,
alignSelf: 'flex-start',
borderRadius: 13.5,
height: 27

}

var defaultProps = {
style: type
}

return computeProps(this.props, defaultProps);

}
render() {
return(
<View {...this.prepareRootProps()}>
<Text style={{ color: (this.props.textStyle && this.props.textStyle.color) ? this.props.textStyle.color : this.getTheme().badgeColor,
fontSize: (this.props.textStyle && this.props.textStyle.fontSize) ? this.props.textStyle.fontSize : this.getTheme().fontSizeBase,
lineHeight: (this.props.textStyle && this.props.textStyle.lineHeight) ? this.props.textStyle.lineHeight : this.getTheme().lineHeight-1,
textAlign: 'center'}}>{this.props.children}
</Text>
</View>
);
}

}
/* @flow */
'use strict';

import React from 'react';
import {View} from 'react-native';
import NativeBaseComponent from '../Base/NativeBaseComponent';
import computeProps from '../../Utils/computeProps';
import Text from './Text';


export default class BadgeNB extends NativeBaseComponent {

propTypes: {
style : React.PropTypes.object
}

prepareRootProps() {

var type = {

backgroundColor:this.props.primary ?
this.getTheme().brandPrimary :
this.props.success ?
this.getTheme().brandSuccess :
this.props.info ?
this.getTheme().brandInfo :
this.props.warning ?
this.getTheme().brandWarning :
this.props.danger ?
this.getTheme().brandDanger :
this.getTheme().badgeBg,
padding: 3,
paddingHorizontal: 10,
alignSelf: 'flex-start',
borderRadius: 13.5,
height: 27

}

var defaultProps = {
style: type
}

return computeProps(this.props, defaultProps);

}
render() {
return(
<View {...this.prepareRootProps()}>
<Text style={{ color: (this.props.textStyle && this.props.textStyle.color) ? this.props.textStyle.color : this.getTheme().badgeColor,
fontSize: (this.props.textStyle && this.props.textStyle.fontSize) ? this.props.textStyle.fontSize : this.getTheme().fontSizeBase,
lineHeight: (this.props.textStyle && this.props.textStyle.lineHeight) ? this.props.textStyle.lineHeight : this.getTheme().lineHeight-1,
textAlign: 'center'}}>{this.props.children}
</Text>
</View>
);
}

}

0 comments on commit f76c9c4

Please sign in to comment.