-
Notifications
You must be signed in to change notification settings - Fork 105
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(Cross): [IOAPPX-307] Add
useScreenEndMargin
hook (#5808)
## Short description This PR adds the new `useScreenEndMargin`, a specific hook to use when you have to develop a new screen and you want to get a safe numeric value to set as `paddingBottom` for the `ScrollView`. This hook automatically takes into account each device configuration (devices with safe area boundaries and devices without) This should also help to prevent the inclusion of `SafeAreaView` (or similar) which results in a white block at the corresponding bottom safe area (see image below): <img src="https://github.com/pagopa/io-app/assets/1255491/d771c74b-cce2-4d0c-93a7-b490cbcab6a1" width="240" /> > [!note] > To learn more about the technical details, take a look at the hook file and its comments > [!important] > If you already use `FooterActions` or `IOScrollView` you don't need this hook because the end margin is already taken into account ## List of changes proposed in this pull request - Add `useScreenEndMargin` hook - Add relative example screen in the DS (**Screen End Margin**) ## How to test - Launch the app in the local environment - Go to the **Design System** → **Screen End Margin** (under **Debug**)
- Loading branch information
Showing
10 changed files
with
318 additions
and
221 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.