Skip to content

Commit

Permalink
fix: extra padding for addons scrollview
Browse files Browse the repository at this point in the history
  • Loading branch information
dannyhw committed Jan 21, 2025
1 parent 398bc81 commit f8e4ecf
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/react-native-ui/src/MobileAddonsPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { addons } from '@storybook/core/manager-api';
import { styled } from '@storybook/react-native-theming';
import { Addon_TypesEnum } from '@storybook/core/types';
import { forwardRef, useImperativeHandle, useRef, useState } from 'react';
import { Text, View, useWindowDimensions } from 'react-native';
import { Platform, Text, View, useWindowDimensions } from 'react-native';
import { ScrollView } from 'react-native-gesture-handler';
import Animated, {
useAnimatedKeyboard,
Expand Down Expand Up @@ -47,8 +47,9 @@ export const MobileAddonsPanel = forwardRef<MobileAddonsPanelRef, { storyId?: st
const { height } = useWindowDimensions();

const adjustedBottomSheetSize = useAnimatedStyle(() => {
const extraPadding = Platform.OS === 'android' ? 32 : 16;
return {
maxHeight: height - animatedPosition.value - insets.bottom,
maxHeight: height - animatedPosition.value - insets.bottom - extraPadding,
};
}, [animatedPosition, height, insets.bottom]);

Expand Down

0 comments on commit f8e4ecf

Please sign in to comment.