Skip to content

Commit

Permalink
fix(suite-native): use 20px border radius instead of 24px
Browse files Browse the repository at this point in the history
  • Loading branch information
yanascz committed Oct 4, 2024
1 parent 51cd1ca commit 49d390a
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 15 deletions.
3 changes: 1 addition & 2 deletions packages/theme/src/borders.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export const borders = {

export type Borders = typeof borders;

type NativeRadiusValue = 4 | 8 | 12 | 16 | 20 | 24;
type NativeRadiusValue = 4 | 8 | 12 | 16 | 20;

export const nativeBorders = {
widths: {
Expand All @@ -31,7 +31,6 @@ export const nativeBorders = {
r12: 12,
r16: 16,
r20: 20,
r24: 24,
round: 100, // Equivalent to 50% on the web
} satisfies { [V in NativeRadiusValue as `r${V}`]: V } & { round: 100 },
} as const;
Expand Down
4 changes: 2 additions & 2 deletions suite-native/atoms/src/Sheet/BottomSheet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ const DEFAULT_INSET_BOTTOM = 50;

const sheetWrapperStyle = prepareNativeStyle<WrapperStyleProps>((utils, { insetBottom }) => ({
backgroundColor: utils.colors.backgroundSurfaceElevation0,
borderTopLeftRadius: utils.borders.radii.r24,
borderTopRightRadius: utils.borders.radii.r24,
borderTopLeftRadius: utils.borders.radii.r20,
borderTopRightRadius: utils.borders.radii.r20,
paddingBottom: Math.max(insetBottom, utils.spacings.sp16),
maxHeight: '90%',
}));
Expand Down
2 changes: 1 addition & 1 deletion suite-native/graph/src/components/GraphError.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ type GraphErrorProps = {
const errorIconStyle = prepareNativeStyle(({ borders, colors }) => ({
width: 48,
height: 48,
borderRadius: borders.radii.r24,
borderRadius: borders.radii.round,
backgroundColor: colors.backgroundAlertYellowSubtleOnElevation1,
borderColor: colors.backgroundAlertYellowSubtleOnElevation0,
borderWidth: 3,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import { NetworkSymbol } from '@suite-common/wallet-config';

const assetCardStyle = prepareNativeStyle(utils => ({
padding: utils.spacings.sp24,
borderRadius: utils.borders.radii.r24,
borderRadius: utils.borders.radii.r20,
width: '100%',
}));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,6 @@ type PassphraseFormProps = {
noPassphraseEnabled?: boolean;
};

const formStyle = prepareNativeStyle(utils => ({
backgroundColor: utils.colors.backgroundSurfaceElevation1,
borderRadius: utils.borders.radii.r24,
gap: utils.spacings.sp16,
}));

const cardStyle = prepareNativeStyle(_ => ({
padding: FORM_CARD_PADDING,
}));
Expand Down Expand Up @@ -126,7 +120,7 @@ export const PassphraseForm = ({
<Form form={form}>
<View ref={formWrapperView}>
<Card style={applyStyle(cardStyle)}>
<VStack style={applyStyle(formStyle)}>
<VStack spacing="sp16">
<SecureTextInputField
label={inputLabel}
name="passphrase"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const cardStyle = prepareNativeStyle(utils => ({
width: '100%',
paddingHorizontal: utils.spacings.sp24,
paddingVertical: utils.spacings.sp32,
borderRadius: utils.borders.radii.r24,
borderRadius: utils.borders.radii.r20,
}));

const receiveButtonStyle = prepareNativeStyle(() => ({
Expand Down
2 changes: 1 addition & 1 deletion suite-native/video-assets/src/components/Video.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const videoContainer = prepareNativeStyle((_, { aspectRatio }: VideoStyleProps)
const videoStyle = prepareNativeStyle((utils, { aspectRatio }: VideoStyleProps) => ({
flex: 1,
aspectRatio,
borderRadius: utils.borders.radii.r24,
borderRadius: utils.borders.radii.r20,
}));

const activityIndicatorStyle = prepareNativeStyle(_ => ({
Expand Down

0 comments on commit 49d390a

Please sign in to comment.