application-amicale/components/CustomMaterialIcon.js
2019-06-28 11:35:15 +02:00

30 lines
1 KiB
JavaScript

import React from 'react';
import {Icon} from "native-base";
import ThemeManager from '../utils/ThemeManager';
export default class CustomMaterialIcon extends React.Component {
constructor(props) {
super(props);
}
render() {
return (
<Icon
active
name={this.props.icon}
type={'MaterialCommunityIcons'}
style={{
color:
this.props.color !== undefined ?
this.props.color :
this.props.active ?
ThemeManager.getInstance().getCurrentThemeVariables().brandPrimary :
ThemeManager.getInstance().getCurrentThemeVariables().customMaterialIconColor,
fontSize: this.props.fontSize !== undefined ? this.props.fontSize : 26,
width: this.props.width !== undefined ? this.props.width : 30
}}
/>
);
}
}