mirror of
https://github.com/ecency/ecency-mobile.git
synced 2025-01-04 03:56:54 +03:00
added remove icon with ui fine tuning
This commit is contained in:
parent
0331ef9ec4
commit
d8973d328c
@ -31,6 +31,7 @@ const TagContainer = ({
|
||||
communityTitle,
|
||||
prefix,
|
||||
suffix,
|
||||
removeEnabled,
|
||||
}) => {
|
||||
const [label, setLabel] = useState(value);
|
||||
const [isCommunity, setIsCommunity] = useState(false);
|
||||
@ -96,6 +97,7 @@ const TagContainer = ({
|
||||
disabled={disabled}
|
||||
prefix={prefix}
|
||||
suffix={suffix}
|
||||
removeEnabled={removeEnabled}
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
@ -21,6 +21,8 @@ export default EStyleSheet.create({
|
||||
height: 22,
|
||||
backgroundColor: '$iconColor',
|
||||
borderRadius: 50,
|
||||
flexDirection:'row',
|
||||
alignItems:'center'
|
||||
},
|
||||
isFilter: {
|
||||
backgroundColor: 'transparent',
|
||||
|
@ -1,6 +1,8 @@
|
||||
import React from 'react';
|
||||
import { Text, View, TouchableOpacity } from 'react-native';
|
||||
import EStyleSheet from 'react-native-extended-stylesheet';
|
||||
import styles from './tagStyles';
|
||||
import { Icon } from '../../../icon';
|
||||
|
||||
const Tag = ({
|
||||
onPress,
|
||||
@ -14,6 +16,7 @@ const Tag = ({
|
||||
disabled,
|
||||
prefix,
|
||||
suffix,
|
||||
removeEnabled
|
||||
}) => (
|
||||
<TouchableOpacity
|
||||
hitSlop={{ top: 10, bottom: 10, left: 10, right: 10 }}
|
||||
@ -39,6 +42,15 @@ const Tag = ({
|
||||
>
|
||||
{`${prefix ? prefix : ''} ${label}${suffix ? suffix : ''}`}
|
||||
</Text>
|
||||
{removeEnabled && (
|
||||
<Icon name="close"
|
||||
iconType="MaterialCommunityIcons"
|
||||
color={EStyleSheet.value('$primaryDarkText')}
|
||||
size={12}
|
||||
style={{paddingLeft:6}}
|
||||
/>
|
||||
)}
|
||||
|
||||
</View>
|
||||
</TouchableOpacity>
|
||||
);
|
||||
|
@ -12,11 +12,12 @@ export default EStyleSheet.create({
|
||||
borderBottomColor: '$primaryDarkGray',
|
||||
},
|
||||
tagContainer:{
|
||||
borderWidth:EStyleSheet.hairlineWidth,
|
||||
borderColor: '$primaryDarkGray',
|
||||
marginLeft:0,
|
||||
marginRight:12,
|
||||
backgroundColor: '$primaryLightBackground'
|
||||
} as ViewStyle,
|
||||
tagText:{
|
||||
marginBottom:2,
|
||||
color: '$primaryDarkText',
|
||||
} as TextStyle,
|
||||
textInput: {
|
||||
@ -24,6 +25,7 @@ export default EStyleSheet.create({
|
||||
fontSize: 15,
|
||||
fontFamily: '$editorFont',
|
||||
height: isAndroidOreo() ? 36 : 40,
|
||||
minWidth: 250
|
||||
} as TextStyle,
|
||||
warning: {
|
||||
color: '$primaryRed',
|
||||
|
Loading…
Reference in New Issue
Block a user