File tree 1 file changed +11
-1
lines changed
static/app/components/core/input
1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -83,7 +83,8 @@ export interface InputProps
83
83
* To add leading/trailing items (e.g. a search icon on the left side), use
84
84
* InputControl (components/inputControl) instead.
85
85
*/
86
- export const Input = styled (
86
+
87
+ const StyledInput = styled (
87
88
forwardRef < HTMLInputElement , InputProps > (
88
89
(
89
90
{
@@ -100,6 +101,15 @@ export const Input = styled(
100
101
) => < input { ...props } ref = { ref } size = { nativeSize } />
101
102
) ,
102
103
{ shouldForwardProp : prop => typeof prop === 'string' && isPropValid ( prop ) }
104
+ ) `` ;
105
+
106
+ // This is a hack - emotion does not support overriding the shouldForwardProp
107
+ // for styled components, but if we wrap it inside another component, we can
108
+ // prevent it from doing that while still applying the styles.
109
+ export const Input = styled (
110
+ forwardRef < HTMLInputElement , InputProps > ( ( props : InputProps , ref ) => (
111
+ < StyledInput { ...props } ref = { ref } />
112
+ ) )
103
113
) `
104
114
${ p => ( p . theme . isChonk ? chonkInputStyles ( p as any ) : inputStyles ( p ) ) }
105
115
` ;
You can’t perform that action at this time.
0 commit comments