Skip to content

Commit

Permalink
fix: solution for backdrop without accessibility
Browse files Browse the repository at this point in the history
  • Loading branch information
OtavioStasiak committed Jan 8, 2025
1 parent 0fa69e3 commit a99ed5f
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
7 changes: 6 additions & 1 deletion app/containers/TwoFactor/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,12 @@ const TwoFactor = React.memo(() => {
const color = colors.fontTitlesLabels;
return (
<Modal
accessibilityLabel={I18n.t('Close_Modal')}
customBackdrop={
<View
accessible
accessibilityLabel={I18n.t('Close_Modal')}
style={[styles.overlay, { backgroundColor: colors.overlayBackground }]}></View>
}
avoidKeyboard
useNativeDriver
isVisible={visible}
Expand Down
5 changes: 5 additions & 0 deletions app/containers/TwoFactor/styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,10 @@ export default StyleSheet.create({
},
tablet: {
height: undefined
},
overlay: {
flex: 1,
alignItems: 'center',
justifyContent: 'center'
}
});
4 changes: 4 additions & 0 deletions app/lib/constants/colors.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const backdropColor = '#000000';
const overlayBackground = 'rgba(31, 35, 41, 0.65)';

const light = {
surfaceLight: '#FFFFFF',
Expand Down Expand Up @@ -280,18 +281,21 @@ export const colors = {
light: {
...light,
backdropColor,
overlayBackground,
backdropOpacity: 0.3,
attachmentLoadingOpacity: 0.7
},
dark: {
...dark,
backdropColor,
overlayBackground,
backdropOpacity: 0.9,
attachmentLoadingOpacity: 0.3
},
black: {
...black,
backdropColor,
overlayBackground,
backdropOpacity: 0.9,
attachmentLoadingOpacity: 0.3
}
Expand Down

0 comments on commit a99ed5f

Please sign in to comment.