verstka
This commit is contained in:
42
src/components/SortingButton/SortingButton.tsx
Normal file
42
src/components/SortingButton/SortingButton.tsx
Normal file
@@ -0,0 +1,42 @@
|
||||
import {FC} from "react";
|
||||
import {StyleSheet, View, Image, TouchableOpacity, GestureResponderEvent} from "react-native";
|
||||
import DText from "../DText/DText";
|
||||
import {RFPercentage} from "react-native-responsive-fontsize";
|
||||
import {responsiveWidth} from "react-native-responsive-dimensions";
|
||||
|
||||
type Props = {
|
||||
onPress?: (event: GestureResponderEvent) => void
|
||||
|
||||
};
|
||||
const SortingButton: FC<Props> = ({onPress}) => {
|
||||
return (
|
||||
<TouchableOpacity onPress={onPress}>
|
||||
<View style={styles.container}>
|
||||
<View style={styles.imageWrapper}>
|
||||
<Image style={styles.image} source={require('assets/icons/sorting.png')}/>
|
||||
</View>
|
||||
<DText>Сортировка</DText>
|
||||
</View>
|
||||
</TouchableOpacity>
|
||||
|
||||
)
|
||||
}
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
container: {
|
||||
display: 'flex',
|
||||
flexDirection: 'row',
|
||||
alignItems: 'center',
|
||||
columnGap: responsiveWidth(1)
|
||||
},
|
||||
imageWrapper: {
|
||||
width: RFPercentage(3),
|
||||
height: RFPercentage(3)
|
||||
},
|
||||
image: {
|
||||
resizeMode: 'contain',
|
||||
width: '100%',
|
||||
height: '100%'
|
||||
}
|
||||
});
|
||||
export default SortingButton;
|
||||
Reference in New Issue
Block a user