fix: resolve typescript and build errors across admin and guest apps
This commit is contained in:
@@ -58,7 +58,7 @@ export const MobileInput = React.forwardRef<HTMLInputElement, React.ComponentPro
|
||||
<Input
|
||||
ref={ref as React.Ref<any>}
|
||||
{...props}
|
||||
type={type}
|
||||
{...({ type } as any)}
|
||||
secureTextEntry={isPassword}
|
||||
onChangeText={(value) => {
|
||||
onChange?.({ target: { value } } as React.ChangeEvent<HTMLInputElement>);
|
||||
@@ -75,11 +75,11 @@ export const MobileInput = React.forwardRef<HTMLInputElement, React.ComponentPro
|
||||
focusStyle={{
|
||||
borderColor: hasError ? danger : primary,
|
||||
boxShadow: `0 0 0 3px ${ringColor}`,
|
||||
}}
|
||||
} as any}
|
||||
hoverStyle={{
|
||||
borderColor,
|
||||
}}
|
||||
style={style}
|
||||
} as any}
|
||||
style={style as any}
|
||||
/>
|
||||
);
|
||||
},
|
||||
@@ -97,11 +97,11 @@ export const MobileTextArea = React.forwardRef<
|
||||
<TextArea
|
||||
ref={ref as React.Ref<any>}
|
||||
{...props}
|
||||
{...({ minHeight: compact ? 72 : 96 } as any)}
|
||||
onChangeText={(value) => {
|
||||
onChange?.({ target: { value } } as React.ChangeEvent<HTMLTextAreaElement>);
|
||||
}}
|
||||
size={compact ? '$3' : '$4'}
|
||||
minHeight={compact ? 72 : 96}
|
||||
borderRadius={12}
|
||||
padding="$3"
|
||||
width="100%"
|
||||
@@ -112,11 +112,11 @@ export const MobileTextArea = React.forwardRef<
|
||||
focusStyle={{
|
||||
borderColor: hasError ? danger : primary,
|
||||
boxShadow: `0 0 0 3px ${ringColor}`,
|
||||
}}
|
||||
} as any}
|
||||
hoverStyle={{
|
||||
borderColor,
|
||||
}}
|
||||
style={{ resize: 'vertical', ...style }}
|
||||
} as any}
|
||||
style={{ resize: 'vertical', ...style } as any}
|
||||
/>
|
||||
);
|
||||
});
|
||||
@@ -173,36 +173,36 @@ export function MobileSelect({
|
||||
width="100%"
|
||||
borderRadius={12}
|
||||
borderWidth={1}
|
||||
borderColor={borderColor}
|
||||
backgroundColor={surface}
|
||||
borderColor={borderColor as any}
|
||||
backgroundColor={surface as any}
|
||||
paddingVertical={compact ? 6 : 10}
|
||||
paddingHorizontal="$3"
|
||||
disabled={props.disabled}
|
||||
onFocus={props.onFocus}
|
||||
onBlur={props.onBlur}
|
||||
onFocus={props.onFocus as any}
|
||||
onBlur={props.onBlur as any}
|
||||
iconAfter={<ChevronDown size={16} color={subtle} />}
|
||||
focusStyle={{
|
||||
borderColor: hasError ? danger : primary,
|
||||
borderColor: (hasError ? danger : primary) as any,
|
||||
boxShadow: `0 0 0 3px ${ringColor}`,
|
||||
}}
|
||||
hoverStyle={{
|
||||
borderColor,
|
||||
borderColor: borderColor as any,
|
||||
}}
|
||||
style={style}
|
||||
style={style as any}
|
||||
>
|
||||
<Select.Value placeholder={props.placeholder ?? emptyOption?.label ?? ''} color={text} />
|
||||
<Select.Value placeholder={props.placeholder ?? (emptyOption?.label as any) ?? ''} {...({ color: text } as any)} />
|
||||
</Select.Trigger>
|
||||
<Select.Content
|
||||
zIndex={200000}
|
||||
borderRadius={14}
|
||||
{...({ borderRadius: 14 } as any)}
|
||||
borderWidth={1}
|
||||
borderColor={border}
|
||||
backgroundColor={surface}
|
||||
backgroundColor={surface as any}
|
||||
>
|
||||
<Select.Viewport padding="$2">
|
||||
<Select.Viewport {...({ padding: "$2" } as any)}>
|
||||
<Select.Group>
|
||||
{options.map((option, index) => (
|
||||
<Select.Item key={`${option.value}-${index}`} value={option.value} disabled={option.disabled}>
|
||||
<Select.Item index={index} key={`${option.value}-${index}`} value={option.value} disabled={option.disabled}>
|
||||
<Select.ItemText>{option.label}</Select.ItemText>
|
||||
</Select.Item>
|
||||
))}
|
||||
|
||||
Reference in New Issue
Block a user