Skip to content

Commit

Permalink
fix: navigar theme
Browse files Browse the repository at this point in the history
  • Loading branch information
linjinze999 committed Sep 14, 2024
1 parent 387f5f3 commit cfe3669
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions packages/hippy_ui_react/src/components/Navigator/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export const navigatorConfig: ThemeConfigNavigator = {
navigatorBackPropsFn: (params) => {
const {
consumerValue: { theme },
props: { back },
props: { back, theme: propsTheme },
} = params;
const uriWhite =
'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAkUExURUdwTP///////////////////////////////////////////xR6XWcAAAALdFJOUwDdIIFfMO9IoxBvT6WWbwAAAKhJREFUOMvN07EOAUEUheEba4NOdLINtUYp2Ual0dB4A5VGr9HqPIJaJyNWnJez+vNLJIqd8p58xZw7E9GQ07uOfDDW0M5bhe4AVAFQH8DtDODkwFp6unm+k44u2HwBUxcspOTmbQFY/gpKABmBiaDvg3QJEAMbdOvC/bZLItmfyTagrccqoF9/+069wnnA0l82yAuo+PMSEz12JhWRRD+qgj8420fDzxvSrEzZSe8rLgAAAABJRU5ErkJggg==';
Expand All @@ -57,17 +57,18 @@ export const navigatorConfig: ThemeConfigNavigator = {
return {
accessible: true,
accessibilityLabel: '返回 按钮',
source: { uri: typeof back === 'string' ? back : theme === ThemeMode.dark ? uriWhite : uriBlack },
source: { uri: typeof back === 'string' ? back : (propsTheme || theme) === ThemeMode.dark ? uriWhite : uriBlack },
style: {
width: 24,
height: 24,
backgroundColor: 'transparent',
},
};
},
navigatorTitlePropsFn: () => {
navigatorTitlePropsFn: (params) => {
return {
numberOfLines: 1,
theme: params.props.theme,
style: {
flex: 1,
flexShrink: 1,
Expand Down

0 comments on commit cfe3669

Please sign in to comment.