Skip to content

Commit 1db1b11

Browse files
committed
[Mobile] Fix separator height
Stop using StyleSheet.hairlineWidth
1 parent b29713e commit 1db1b11

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

packages/components/src/components/common/Button.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { rgba } from 'polished'
22
import React, { useCallback, useLayoutEffect, useRef } from 'react'
3-
import { StyleSheet, ViewProps } from 'react-native'
3+
import { ViewProps } from 'react-native'
44
import { useSpring } from 'react-spring/native'
55

66
import { constants } from '@devhub/core'
@@ -176,7 +176,7 @@ export const Button = React.memo((props: ButtonProps) => {
176176
height: size,
177177
backgroundColor: springAnimatedStyles.touchableBackgroundColor,
178178
borderColor: springAnimatedStyles.touchableBorderColor,
179-
borderWidth: showBorder ? StyleSheet.hairlineWidth : 0,
179+
borderWidth: showBorder ? 1 : 0,
180180
borderRadius: round ? (size || defaultButtonSize) / 2 : 0,
181181
},
182182
style,

packages/components/src/components/common/Label.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import React, { ReactNode } from 'react'
22
import {
33
StyleProp,
4-
StyleSheet,
54
Text,
65
TextProps,
76
View,
@@ -107,7 +106,7 @@ export function Label(props: LabelProps) {
107106
alignItems: 'center',
108107
justifyContent: 'center',
109108
borderRadius: typeof radius === 'number' ? radius : height / 2,
110-
borderWidth: outline ? StyleSheet.hairlineWidth : 0,
109+
borderWidth: outline ? 1 : 0,
111110
},
112111
containerProps && containerProps.style,
113112
containerStyle,

packages/components/src/components/common/Separator.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import { getLuminance } from 'polished'
22
import React from 'react'
3-
import { StyleSheet, View } from 'react-native'
3+
import { View } from 'react-native'
44

55
import { ThemeColors } from '@devhub/core'
66
import { ThemedView } from '../themed/ThemedView'
77

8-
export const separatorSize = StyleSheet.hairlineWidth * 2
8+
export const separatorSize = 2
99
export const separatorThickSize = 5
1010

1111
export function getSeparatorThemeColors(

0 commit comments

Comments
 (0)