Learn how to normalize the components.
@/constants/appConstants.tsx
normalize
export const ScreenHeight: number = SCREEN_HEIGHT; export const ScreenWidth: number = SCREEN_WIDTH; export const PADDING: Record<PaddingSize, number> = { xxxs: scale(1), xxs: scale(2), xs: scale(4), sm: scale(8), md: scale(16), lg: scale(24), xl: scale(32), xxl: scale(40), xxxl: scale(48), };
<View style={{ padding: PADDING.md }}> <Text style={{ fontSize: FONT_SIZE.lg }}>Hello</Text> </View>
Was this page helpful?