Skip to content

Commit

Permalink
Merge pull request #40822 from tienifr/fix/38594-fix-illustration-nat…
Browse files Browse the repository at this point in the history
…ive-device

fix illustration is sitting too far down
  • Loading branch information
danieldoglas authored Jun 6, 2024
2 parents 1777d7e + a08557b commit 1f3658c
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/pages/settings/Troubleshoot/TroubleshootPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import type {TranslationPaths} from '@src/languages/types';
import ONYXKEYS from '@src/ONYXKEYS';
import ROUTES from '@src/ROUTES';
import SCREENS from '@src/SCREENS';
import getLightbulbIllustrationStyle from './getLightbulbIllustrationStyle';

type BaseMenuItem = {
translationKey: TranslationPaths;
Expand All @@ -50,6 +51,7 @@ function TroubleshootPage({shouldStoreLogs}: TroubleshootPageProps) {
const [isConfirmationModalVisible, setIsConfirmationModalVisible] = useState(false);
const waitForNavigate = useWaitForNavigation();
const {isSmallScreenWidth} = useWindowDimensions();
const illustrationStyle = getLightbulbIllustrationStyle();

const menuItems = useMemo(() => {
const debugConsoleItem: BaseMenuItem = {
Expand Down Expand Up @@ -101,7 +103,7 @@ function TroubleshootPage({shouldStoreLogs}: TroubleshootPageProps) {
isCentralPane
subtitleMuted
illustration={LottieAnimations.Desk}
illustrationStyle={[styles.mt4, styles.mbn4]}
illustrationStyle={illustrationStyle}
titleStyles={styles.accountSettingsSectionTitle}
illustrationBackgroundColor={theme.PAGE_THEMES[SCREENS.SETTINGS.TROUBLESHOOT].backgroundColor}
renderSubtitle={() => (
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import type {ViewStyle} from 'react-native';

// Styling lottie animations for the Lightbulb component requires different margin values depending on the platform.
export default function getLightbulbIllustrationStyle(): ViewStyle {
return {};
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import type {ViewStyle} from 'react-native';

// Styling lottie animations for the Lightbulb component requires different margin values depending on the platform.
export default function getTripIllustrationStyle(): ViewStyle {
return {
marginTop: 16,
marginBottom: -16,
};
}

0 comments on commit 1f3658c

Please sign in to comment.