Skip to content

Commit ebb6e62

Browse files
committed
buttonDock preview Screen styling fix
1 parent 534b952 commit ebb6e62

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

src/components/common/CustomButtonDock.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ import { useSafeAreaInsets } from 'react-native-safe-area-context';
1212
* @param {React.ReactNode} firstButton - The first button component to display
1313
* @param {React.ReactNode} secondButton - The second button component to display
1414
*/
15-
const CustomButtonDock = ({ direction = "vertical", firstButton, secondButton }) => {
15+
const CustomButtonDock = ({ direction = "vertical", firstButton, secondButton, style }) => {
1616
const insets = useSafeAreaInsets();
1717

1818
return (
19-
<View style={[styles.overlay, { marginBottom: insets.bottom }]} pointerEvents="box-none">
19+
<View style={[styles.overlay, { paddingBottom: insets.bottom, ...style }]} pointerEvents="box-none">
2020
<View style={styles.bottomContainer} pointerEvents="box-none">
2121
<View style={[styles.dock, direction === "horizontal" ? styles.horizontal : styles.vertical]}>
2222
{firstButton && (

src/screens/PreviewScreens/buttonDockScreen.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,21 +17,23 @@ const ButtonDockScreen = () => {
1717
style={{
1818
...textStyles.text_sm_regular,
1919
color: colors.grey500,
20-
paddingBottom: paddings.p_32,
20+
marginBottom: paddings.p_32,
2121
}}
2222
>
2323
The count changes dynamically based on the button Count (min 1, max 2)
2424
</Text>
2525
<View style={{ height: 89 }}>
2626
<CustomButtonDock
2727
firstButton={<CustomButton text="Primary" type="primary" />}
28+
style={{paddingBottom: 0}} // No need! Adds custom styling to the ButtonDock. (Just for the preview screen needed)
2829
/>
2930
</View>
3031

3132
<View style={{ marginTop: paddings.p_16, marginBottom: paddings.p_32, height: 161 }}>
3233
<CustomButtonDock
3334
firstButton={<CustomButton text="Primary" type="primary" />}
3435
secondButton={<CustomButton text="Secondary" type="secondary" />}
36+
style={{paddingBottom: 0}} // No need! Adds custom styling to the ButtonDock. (Just for the preview screen needed)
3537
/>
3638
</View>
3739

@@ -51,10 +53,9 @@ const ButtonDockScreen = () => {
5153
direction="horizontal"
5254
firstButton={<CustomButton text="Primary" type="primary" />}
5355
secondButton={<CustomButton text="Secondary" type="secondary" />}
56+
style={{paddingBottom: 0}}
5457
/>
5558
</View>
56-
57-
5859
</ScrollView>
5960
</View>
6061
);

0 commit comments

Comments
 (0)