@@ -5,13 +5,14 @@ import styled from '@/styled-thing';
5
5
import { borders } from '@/styles' ;
6
6
import ShadowStack from '@/react-native-shadow-stack' ;
7
7
import { IS_ANDROID } from '@/env' ;
8
+ import { useAccountAccentColor } from '@/hooks' ;
8
9
9
10
const buildSmallShadows = ( color , colors ) => [
10
11
[ 0 , 3 , 5 , colors . shadow , 0.14 ] ,
11
12
[ 0 , 6 , 10 , colors . avatarBackgrounds [ color ] || color , 0.2 ] ,
12
13
] ;
13
14
14
- const sizeConfigs = ( colors , isDarkMode ) => ( {
15
+ const sizeConfigs = ( accentColor , colors , isDarkMode ) => ( {
15
16
header : {
16
17
dimensions : 34 ,
17
18
textSize : 'large' ,
@@ -32,19 +33,25 @@ const sizeConfigs = (colors, isDarkMode) => ({
32
33
] ,
33
34
textSize : 28 ,
34
35
} ,
35
- sim : {
36
- dimensions : 44 ,
37
- shadow : [
38
- [ 0 , 4 , 6 , colors . shadow , 0.04 ] ,
39
- [ 0 , 1 , 3 , colors . shadow , 0.08 ] ,
40
- ] ,
41
- textSize : 'larger' ,
42
- } ,
43
36
medium : {
44
37
dimensions : 40 ,
45
38
shadow : [ [ 0 , 4 , 12 , colors . shadow , isDarkMode ? 0.3 : 0.15 ] ] ,
46
39
textSize : 'larger' ,
47
40
} ,
41
+ signing : {
42
+ dimensions : 44 ,
43
+ shadow : [
44
+ [
45
+ 0 ,
46
+ 4 ,
47
+ 12 ,
48
+ ! isDarkMode && accentColor ? accentColor : colors . shadow ,
49
+ isDarkMode ? 0.16 : 0.2 ,
50
+ ] ,
51
+ [ 0 , 2 , 6 , colors . trueBlack , 0.02 ] ,
52
+ ] ,
53
+ textSize : 25 ,
54
+ } ,
48
55
small : {
49
56
dimensions : 30 ,
50
57
shadow : [ [ 0 , 3 , 9 , colors . shadow , 0.1 ] ] ,
@@ -87,10 +94,11 @@ const ImageAvatar = ({
87
94
onLoad = undefined ,
88
95
...props
89
96
} ) => {
97
+ const { accentColor } = useAccountAccentColor ( ) ;
90
98
const { colors, isDarkMode } = useTheme ( ) ;
91
99
const { dimensions, shadow } = useMemo (
92
- ( ) => sizeConfigs ( colors , isDarkMode ) [ size ] ,
93
- [ colors , isDarkMode , size ]
100
+ ( ) => sizeConfigs ( accentColor , colors , isDarkMode ) [ size ] ,
101
+ [ accentColor , colors , isDarkMode , size ]
94
102
) ;
95
103
96
104
const shadows = useMemo (
0 commit comments