Skip to content

Commit 07b1c00

Browse files
committed
adding closed banner to each required component to show up across the app
1 parent 4e271a3 commit 07b1c00

File tree

3 files changed

+23
-20
lines changed

3 files changed

+23
-20
lines changed

app/components/Header.tsx

+2
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import { Text, TextProps } from "./Text"
1414
import { Icon, IconTypes } from "./Icon"
1515
import { isRTL, translate } from "../i18n"
1616
import SafeAreaViewFixed from "./SafeAreaViewFixed"
17+
import { ClosedBanner } from "./ClosedBanner"
1718

1819
export interface HeaderProps {
1920
/**
@@ -175,6 +176,7 @@ export function Header(props: HeaderProps) {
175176
{...HeaderViewProps}
176177
style={[$safeArea, HeaderViewProps?.style, { backgroundColor }]}
177178
>
179+
<ClosedBanner />
178180
<View style={[$container, $containerStyleOverride]}>
179181
<HeaderAction
180182
tx={leftTx}

app/screens/TalkDetailsScreen/TalkDetailsHeader.tsx

+14-11
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React from "react"
22
import { TextStyle, View, ViewStyle } from "react-native"
33
import Animated, { interpolate, SharedValue, useAnimatedStyle } from "react-native-reanimated"
4-
import { Text } from "../../components"
4+
import { ClosedBanner, Text } from "../../components"
55
import { BackButton } from "../../navigators/BackButton"
66
import { colors, layout, spacing } from "../../theme"
77

@@ -36,16 +36,19 @@ export const TalkDetailsHeader: React.FunctionComponent<TalkDetailsHeaderProps>
3636
}, [headingHeight])
3737

3838
return (
39-
<View style={$rowContainer}>
40-
<BackButton />
41-
<AnimatedText
42-
allowFontScaling={false}
43-
preset="navHeader"
44-
style={[$centerTitle, $animatedTitle]}
45-
>
46-
{title}
47-
</AnimatedText>
48-
</View>
39+
<>
40+
<ClosedBanner />
41+
<View style={$rowContainer}>
42+
<BackButton />
43+
<AnimatedText
44+
allowFontScaling={false}
45+
preset="navHeader"
46+
style={[$centerTitle, $animatedTitle]}
47+
>
48+
{title}
49+
</AnimatedText>
50+
</View>
51+
</>
4952
)
5053
}
5154

app/screens/WelcomeScreen.tsx

+7-9
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@ import {
88
ViewStyle,
99
useWindowDimensions,
1010
} from "react-native"
11-
import { SafeAreaView } from "react-native-safe-area-context"
12-
import { Button, Screen, Text } from "../components"
11+
import { Button, ClosedBanner, Screen, Text } from "../components"
1312
import { useAppNavigation } from "../hooks"
1413
import { AppStackScreenProps } from "../navigators"
1514
import { colors, spacing } from "../theme"
@@ -32,7 +31,8 @@ export const WelcomeScreen: React.FC<WelcomeScreenProps> = (_props) => {
3231
}, [])
3332

3433
return (
35-
<Screen style={$container}>
34+
<Screen safeAreaEdges={["top", "bottom"]} style={$container}>
35+
<ClosedBanner />
3636
<View style={$topContainer}>
3737
<Image style={$welcomeLogo} source={welcomeLogo} />
3838
</View>
@@ -58,7 +58,7 @@ export const WelcomeScreen: React.FC<WelcomeScreenProps> = (_props) => {
5858
/>
5959
</View>
6060

61-
<SafeAreaView style={$bottomContainer} edges={["bottom"]}>
61+
<View style={$bottomContainer}>
6262
<View
6363
style={[
6464
$bottomContentContainer,
@@ -72,7 +72,7 @@ export const WelcomeScreen: React.FC<WelcomeScreenProps> = (_props) => {
7272
onPress={goNext}
7373
/>
7474
</View>
75-
</SafeAreaView>
75+
</View>
7676
</Screen>
7777
)
7878
}
@@ -85,7 +85,7 @@ const $container: ViewStyle = {
8585
const $topContainer: ViewStyle = {
8686
flexShrink: 1,
8787
flexGrow: 1,
88-
flexBasis: "25%",
88+
flexBasis: "20%",
8989
justifyContent: "flex-start",
9090
}
9191

@@ -100,10 +100,8 @@ const $middleContainer: ViewStyle = {
100100
const $bottomContainer: ViewStyle = {
101101
flexShrink: 1,
102102
flexGrow: 0,
103-
flexBasis: "25%",
103+
flexBasis: "20%",
104104
backgroundColor: colors.background,
105-
borderTopLeftRadius: 16,
106-
borderTopRightRadius: 16,
107105
}
108106

109107
const $bottomContentContainer: ViewStyle = {

0 commit comments

Comments
 (0)