1
1
import React from 'react' ;
2
2
import { createInput } from '@gluestack-ui/input' ;
3
- import { AsForwarder } from '@gluestack-style/react' ;
4
3
import { View , Pressable , TextInput , Platform } from 'react-native' ;
5
4
import {
6
5
tva ,
@@ -18,7 +17,7 @@ const UIInput = createInput({
18
17
Platform . OS === 'web'
19
18
? withStyleContext ( View )
20
19
: withStyleContextAndStates ( View ) ,
21
- Icon : AsForwarder ,
20
+ Icon : View ,
22
21
Slot : Pressable ,
23
22
Input : Platform . OS === 'web' ? TextInput : withStates ( TextInput ) ,
24
23
} ) ;
@@ -48,7 +47,7 @@ const inputStyle = tva({
48
47
} ) ;
49
48
50
49
const inputIconStyle = tva ( {
51
- base : 'stroke-2 stroke- typography-400' ,
50
+ base : 'text- typography-400 fill-none ' ,
52
51
parentVariants : {
53
52
size : {
54
53
'2xs' : 'h-3 w-3' ,
@@ -98,7 +97,7 @@ cssInterop(UIInput.Input, { className: 'style' });
98
97
99
98
type IInputProps = React . ComponentProps < typeof UIInput > &
100
99
VariantProps < typeof inputStyle > ;
101
-
100
+ // @ts -ignore
102
101
const Input = React . forwardRef (
103
102
(
104
103
{
@@ -120,17 +119,11 @@ const Input = React.forwardRef(
120
119
}
121
120
) ;
122
121
123
- type IInputIconProps = React . ComponentProps < typeof UIInput . Icon > &
124
- VariantProps < typeof inputIconStyle > ;
122
+ type IInputIconProps = React . ComponentProps < typeof UIInput . Icon > & { as : any } ;
125
123
126
124
const InputIcon = React . forwardRef (
127
125
(
128
- {
129
- className,
130
- as : AsComp ,
131
- fill = 'none' ,
132
- ...props
133
- } : { className ?: any } & IInputIconProps ,
126
+ { className, as : AsComp , ...props } : { className ?: any } & IInputIconProps ,
134
127
ref
135
128
) => {
136
129
const { size : parentSize } = useStyleContext ( ) ;
@@ -140,7 +133,6 @@ const InputIcon = React.forwardRef(
140
133
< AsComp
141
134
ref = { ref }
142
135
{ ...props }
143
- fill = { fill }
144
136
className = { inputIconStyle ( {
145
137
parentVariants : {
146
138
size : parentSize ,
@@ -154,7 +146,6 @@ const InputIcon = React.forwardRef(
154
146
< UIInput . Icon
155
147
ref = { ref }
156
148
{ ...props }
157
- fill = { fill }
158
149
className = { inputIconStyle ( {
159
150
parentVariants : {
160
151
size : parentSize ,
0 commit comments