You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-06-27 23:28:38 +02:00
Icons and styling
This commit is contained in:
Icon.psdIcon144.pngIcon48.pngIcon512.pngIcon72.pngIcon96.png
ReactNativeClient
@ -2,13 +2,13 @@ import React, { Component } from 'react';
|
||||
import { StyleSheet, TouchableHighlight } from 'react-native';
|
||||
import Icon from 'react-native-vector-icons/Ionicons';
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
const styles = {
|
||||
checkboxIcon: {
|
||||
fontSize: 20,
|
||||
height: 22,
|
||||
marginRight: 10,
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
class Checkbox extends Component {
|
||||
|
||||
@ -42,9 +42,19 @@ class Checkbox extends Component {
|
||||
style.justifyContent = 'center';
|
||||
style.alignItems = 'center';
|
||||
|
||||
const checkboxIconStyle = Object.assign({}, styles.checkboxIcon);
|
||||
if (style.color) checkboxIconStyle.color = style.color;
|
||||
|
||||
const thStyle = {
|
||||
justifyContent: 'center',
|
||||
alignItems: 'center',
|
||||
};
|
||||
|
||||
if (style.display) thStyle.display = style.display;
|
||||
|
||||
return (
|
||||
<TouchableHighlight onPress={() => this.onPress()} style={style}>
|
||||
<Icon name={iconName} style={styles.checkboxIcon}/>
|
||||
<TouchableHighlight onPress={() => this.onPress()} style={thStyle}>
|
||||
<Icon name={iconName} style={checkboxIconStyle}/>
|
||||
</TouchableHighlight>
|
||||
);
|
||||
}
|
||||
|
Reference in New Issue
Block a user