1
1
import React from "react" ;
2
- import {
3
- Pressable ,
4
- Image ,
5
- ImageURISource ,
6
- useWindowDimensions ,
7
- } from "react-native" ;
2
+ import { Pressable , Image , ImageURISource } from "react-native" ;
8
3
import { Surface , useTheme } from "react-native-paper" ;
9
4
import { useNavigation } from "@react-navigation/native" ;
10
5
import { PreferencesContext } from "../../Contexts/PreferencesContext" ;
@@ -15,7 +10,6 @@ interface navigationButton {
15
10
image : ImageURISource ;
16
11
widthFactor ?: number ;
17
12
heightFactor ?: number ;
18
- hoverSizeFactor ?: number ;
19
13
testID : string ;
20
14
}
21
15
@@ -28,9 +22,6 @@ const NavigationButton = (props: navigationButton) => {
28
22
29
23
const WIDTH_FACTOR : number = props . widthFactor ? props . widthFactor : 4.5 ;
30
24
const HEIGHT_FACTOR : number = props . heightFactor ? props . heightFactor : 9 ;
31
- const HOVER_SIZE_FACTOR : number = props . hoverSizeFactor
32
- ? props . hoverSizeFactor
33
- : 1.1 ;
34
25
35
26
const WIDTH : number = minWindowSize . width / WIDTH_FACTOR ;
36
27
const HEIGHT : number = minWindowSize . height / HEIGHT_FACTOR ;
@@ -46,10 +37,12 @@ const NavigationButton = (props: navigationButton) => {
46
37
return (
47
38
< Surface
48
39
style = { {
49
- width : hovered ? WIDTH * HOVER_SIZE_FACTOR : WIDTH ,
50
- height : hovered ? HEIGHT * HOVER_SIZE_FACTOR : HEIGHT ,
51
- borderColor : theme . colors . onSurfaceVariant ,
52
- borderWidth : 4 ,
40
+ width : WIDTH ,
41
+ height : HEIGHT ,
42
+ borderColor : hovered
43
+ ? theme . colors . outline
44
+ : theme . colors . onSurface ,
45
+ borderWidth : hovered ? 3 : 2 ,
53
46
} }
54
47
testID = { props . testID }
55
48
>
0 commit comments