Skip to content

Commit

Permalink
refactor(suite-native): use spacings constants for gap attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
yanascz committed Oct 3, 2024
1 parent b549c1a commit 06b86f4
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,12 @@ const contentWrapperStyle = prepareNativeStyle<{ height: number }>((utils, { hei
spacing: utils.spacings.sp16,
}));

const itemStyle = prepareNativeStyle<{ isCompact: boolean }>((_, { isCompact }) => ({
const itemStyle = prepareNativeStyle<{ isCompact: boolean }>((utils, { isCompact }) => ({
flexShrink: 1,
extend: {
condition: !isCompact,
style: {
gap: 2,
gap: utils.spacings.sp2,
},
},
}));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ import { useDeviceManager } from '../hooks/useDeviceManager';
const CONTENT_MAX_HEIGHT = Dimensions.get('window').height * 0.8;
const HEADER_HEIGHT = 86;

const scrollViewStyle = prepareNativeStyle<{ maxHeight: number }>((_, { maxHeight }) => ({
gap: 12,
const scrollViewStyle = prepareNativeStyle<{ maxHeight: number }>((utils, { maxHeight }) => ({
gap: utils.spacings.sp12,
flexGrow: 0,
maxHeight,
borderBottomLeftRadius: MANAGER_MODAL_BOTTOM_RADIUS,
Expand Down
2 changes: 1 addition & 1 deletion suite-native/device-manager/src/components/WalletItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const walletItemStyle = prepareNativeStyle<WalletItemStyleProps>(
justifyContent: 'space-between',
alignItems: 'center',
height: 60,
gap: 12,
gap: utils.spacings.sp12,
borderRadius: 12,
borderColor: utils.colors.borderElevation1,
flex: 1,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ const aboutStyle = prepareNativeStyle((utils, { bottomInset }: { bottomInset: nu
paddingBottom: EXTRA_BOTTOM_PADDING + GRADIENT_HEIGHT + bottomInset,
width: '100%',
paddingHorizontal: utils.spacings.sp8,
gap: 12,
gap: utils.spacings.sp12,
}));

export const SelectAccountTypeScreen = ({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import { QuestionMarks } from '../../assets/passphrase/QuestionMarks';
const cardStyle = prepareNativeStyle(utils => ({
borderColor: utils.colors.borderElevation0,
borderWidth: utils.borders.widths.small,
gap: 12,
gap: utils.spacings.sp12,
}));

const cardContentStyle = prepareNativeStyle(() => ({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const cardStyle = prepareNativeStyle(utils => ({
const deviceStyle = prepareNativeStyle(utils => ({
padding: utils.spacings.sp16,
alignItems: 'center',
gap: 12,
gap: utils.spacings.sp12,
}));

export const DevicesManagement = ({ onPressAbout }: AboutProps) => {
Expand Down

0 comments on commit 06b86f4

Please sign in to comment.