mirror of
https://github.com/ecency/ecency-mobile.git
synced 2024-12-18 02:41:39 +03:00
added quick profile action panel
This commit is contained in:
parent
51fcdd0c22
commit
433cbba484
@ -0,0 +1,30 @@
|
|||||||
|
import * as React from 'react';
|
||||||
|
import { Text, View, StyleSheet } from 'react-native';
|
||||||
|
import EStyleSheet from 'react-native-extended-stylesheet';
|
||||||
|
import { IconButton } from '../../..';
|
||||||
|
import styles from './quickProfileStyles';
|
||||||
|
|
||||||
|
interface ActionPanelProps {
|
||||||
|
isFollowing:boolean,
|
||||||
|
isFavourite:boolean,
|
||||||
|
}
|
||||||
|
|
||||||
|
export const ActionPanel = ({isFollowing, isFavourite}: ActionPanelProps) => {
|
||||||
|
return (
|
||||||
|
<View style={styles.actionPanel}>
|
||||||
|
<IconButton
|
||||||
|
iconType='SimpleLineIcons'
|
||||||
|
name={isFollowing?'user-following':'user-follow'}
|
||||||
|
size={20}
|
||||||
|
color={EStyleSheet.value('$primaryBlack')}
|
||||||
|
/>
|
||||||
|
<IconButton
|
||||||
|
style={{marginLeft:8}}
|
||||||
|
iconType='SimpleLineIcons'
|
||||||
|
name={'heart'}
|
||||||
|
size={20}
|
||||||
|
color={EStyleSheet.value(isFavourite?'$primaryRed':'$primaryBlack')}
|
||||||
|
/>
|
||||||
|
</View>
|
||||||
|
);
|
||||||
|
};
|
@ -10,6 +10,7 @@ import styles from './quickProfileStyles'
|
|||||||
import { ProfileBasic } from './profileBasic'
|
import { ProfileBasic } from './profileBasic'
|
||||||
import { parseReputation } from '../../../../utils/user'
|
import { parseReputation } from '../../../../utils/user'
|
||||||
import { default as ROUTES } from '../../../../constants/routeNames';
|
import { default as ROUTES } from '../../../../constants/routeNames';
|
||||||
|
import { ActionPanel } from './actionPanel'
|
||||||
|
|
||||||
interface QuickProfileContentProps {
|
interface QuickProfileContentProps {
|
||||||
username:string,
|
username:string,
|
||||||
@ -177,6 +178,10 @@ export const QuickProfileContent = ({
|
|||||||
text='VIEW FULL PROFILE'
|
text='VIEW FULL PROFILE'
|
||||||
onPress={_openFullProfile}
|
onPress={_openFullProfile}
|
||||||
/>
|
/>
|
||||||
|
<ActionPanel
|
||||||
|
isFollowing={isFollowing}
|
||||||
|
isFavourite={isFavourite}
|
||||||
|
/>
|
||||||
</View>
|
</View>
|
||||||
)
|
)
|
||||||
};
|
};
|
||||||
|
@ -89,10 +89,13 @@ export default EStyleSheet.create({
|
|||||||
|
|
||||||
|
|
||||||
actionPanel:{
|
actionPanel:{
|
||||||
width:'100%',
|
position: 'absolute',
|
||||||
|
right:0,
|
||||||
|
top:0,
|
||||||
flexDirection:'row',
|
flexDirection:'row',
|
||||||
justifyContent:'space-around',
|
|
||||||
alignItems:'center',
|
alignItems:'center',
|
||||||
} as ViewStyle,
|
} as ViewStyle,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
})
|
})
|
Loading…
Reference in New Issue
Block a user