@@ -9,10 +9,11 @@ import { BottomSheetFlatList, BottomSheetModal } from "@gorhom/bottom-sheet";
99import { isUndefined } from "lodash" ;
1010
1111import { Text , Touchable } from "../../primitives" ;
12- import { useTheme } from "../../theme" ;
12+ import { getTextFontFamily , useTheme } from "../../theme" ;
1313import {
1414 createComponent ,
1515 createContext ,
16+ cx ,
1617 RenderPropType ,
1718 styleAdapter ,
1819 useOnHover ,
@@ -174,15 +175,17 @@ const RNSelect: React.FC<Partial<SelectProps>> = forwardRef<
174175 onPress = { handlePresentModalPress }
175176 style = { ( touchState : PressableStateCallbackType ) => [
176177 tailwind . style ( [
177- selectStyle . base . common ,
178- selectStyle . base . size [ size ] . common ,
179- ! prefix ? selectStyle . base . size [ size ] . withoutAddon : "" ,
180- selectStyle . base . variant [ variant ] . default ,
181- invalid ? selectStyle . base . variant [ variant ] . invalid : "" ,
182- disabled ? selectStyle . base . variant [ variant ] . disabled : "" ,
183- touchState . pressed || hovered . value
184- ? selectStyle . base . variant [ variant ] . pressedOrHovered
185- : "" ,
178+ cx (
179+ selectStyle . base . common ,
180+ selectStyle . base . size [ size ] . common ,
181+ ! prefix ? selectStyle . base . size [ size ] . withoutAddon : "" ,
182+ selectStyle . base . variant [ variant ] . default ,
183+ invalid ? selectStyle . base . variant [ variant ] . invalid : "" ,
184+ disabled ? selectStyle . base . variant [ variant ] . disabled : "" ,
185+ touchState . pressed || hovered . value
186+ ? selectStyle . base . variant [ variant ] . pressedOrHovered
187+ : "" ,
188+ ) ,
186189 ] ) ,
187190 styleAdapter ( style , touchState ) ,
188191 ] }
@@ -206,18 +209,24 @@ const RNSelect: React.FC<Partial<SelectProps>> = forwardRef<
206209 isDefaultState = { isUndefined ( selectState ) }
207210 />
208211 < Text
209- style = { tailwind . style ( [
210- selectStyle . base . text . size [ size ] ,
211- touchState . pressed || hovered . value
212- ? selectStyle . base . text . variant [ variant ] . pressedOrHovered
213- : disabled
214- ? selectStyle . base . text . variant [ variant ] . disabled
215- : isUndefined ( selectState )
216- ? selectStyle . base . text . variant [ variant ] . default
217- : selectStyle . base . text . variant [ variant ] . filled ,
218- prefix ? `pl-[${ prefixWidth } px]` : "" ,
219- `pr-[${ suffixWidth } px]` ,
220- ] ) }
212+ style = { [
213+ tailwind . style ( [
214+ cx (
215+ selectStyle . base . text . size [ size ] ,
216+ touchState . pressed || hovered . value
217+ ? selectStyle . base . text . variant [ variant ]
218+ . pressedOrHovered
219+ : disabled
220+ ? selectStyle . base . text . variant [ variant ] . disabled
221+ : isUndefined ( selectState )
222+ ? selectStyle . base . text . variant [ variant ] . default
223+ : selectStyle . base . text . variant [ variant ] . filled ,
224+ prefix ? `pl-[${ prefixWidth } px]` : "" ,
225+ `pr-[${ suffixWidth } px]` ,
226+ ) ,
227+ ] ) ,
228+ getTextFontFamily ( selectStyle . base . text . size [ size ] ) ,
229+ ] }
221230 >
222231 { isUndefined ( selectState )
223232 ? placeholder
0 commit comments