File tree Expand file tree Collapse file tree 3 files changed +12
-2
lines changed
Expand file tree Collapse file tree 3 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -199,6 +199,7 @@ const RNSelect: React.FC<Partial<SelectProps>> = forwardRef<
199199 invalid = { invalid }
200200 prefix = { prefix }
201201 isPressedOrHovered = { pressed || isHovered }
202+ isDefaultState = { isUndefined ( selectState ) }
202203 />
203204 < Text
204205 style = { tailwind . style ( [
@@ -229,6 +230,7 @@ const RNSelect: React.FC<Partial<SelectProps>> = forwardRef<
229230 invalid = { invalid }
230231 suffix = { suffix }
231232 isPressedOrHovered = { pressed || isHovered }
233+ isDefaultState = { isUndefined ( selectState ) }
232234 />
233235 </ >
234236 ) ;
Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ interface SelectPrefixProps
1414 > ,
1515 BoxProps {
1616 isPressedOrHovered : boolean ;
17+ isDefaultState : boolean ;
1718}
1819
1920export const SelectPrefix : React . FC < SelectPrefixProps > = ( {
@@ -23,6 +24,7 @@ export const SelectPrefix: React.FC<SelectPrefixProps> = ({
2324 disabled,
2425 isPressedOrHovered,
2526 prefix,
27+ isDefaultState,
2628 ...props
2729} ) => {
2830 const tailwind = useTheme ( ) ;
@@ -35,7 +37,9 @@ export const SelectPrefix: React.FC<SelectPrefixProps> = ({
3537 ? selectPrefixStyles . prefix . variant [ variant ] . disabled
3638 : invalid
3739 ? selectPrefixStyles . prefix . variant [ variant ] . invalid
38- : selectPrefixStyles . prefix . variant [ variant ] . default ;
40+ : isDefaultState
41+ ? selectPrefixStyles . suffix . variant [ variant ] . default
42+ : selectPrefixStyles . suffix . variant [ variant ] . filled ;
3943
4044 const _prefix : SelectProps [ "prefix" ] = React . useMemo ( ( ) => {
4145 const selectPrefix =
Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ interface SelectSuffixProps
1515 > ,
1616 BoxProps {
1717 isPressedOrHovered : boolean ;
18+ isDefaultState : boolean ;
1819}
1920
2021export const SelectSuffix : React . FC < SelectSuffixProps > = ( {
@@ -24,6 +25,7 @@ export const SelectSuffix: React.FC<SelectSuffixProps> = ({
2425 disabled,
2526 isPressedOrHovered,
2627 suffix,
28+ isDefaultState,
2729 ...props
2830} ) => {
2931 const tailwind = useTheme ( ) ;
@@ -36,7 +38,9 @@ export const SelectSuffix: React.FC<SelectSuffixProps> = ({
3638 ? selectSuffixStyles . suffix . variant [ variant ] . disabled
3739 : invalid
3840 ? selectSuffixStyles . suffix . variant [ variant ] . invalid
39- : selectSuffixStyles . suffix . variant [ variant ] . default ;
41+ : isDefaultState
42+ ? selectSuffixStyles . suffix . variant [ variant ] . default
43+ : selectSuffixStyles . suffix . variant [ variant ] . filled ;
4044
4145 const _suffix : SelectProps [ "suffix" ] = React . useMemo ( ( ) => {
4246 const selectSuffix =
You can’t perform that action at this time.
0 commit comments