File tree Expand file tree Collapse file tree 3 files changed +16
-3
lines changed
packages/form-control/src Expand file tree Collapse file tree 3 files changed +16
-3
lines changed Original file line number Diff line number Diff line change 11import React , { forwardRef } from 'react' ;
22import { useFormControlProvider , FormControlContext } from './useFormControl' ;
3+ import type { IFormControlProps } from './types' ;
34
4- const FormControl = ( StyledFormControlBox : any ) =>
5- forwardRef ( ( { ...props } : any , ref : any ) => {
5+ const FormControl = < T , > ( StyledFormControlBox : React . ComponentType < T > ) =>
6+ forwardRef ( ( { ...props } : T & IFormControlProps , ref : any ) => {
67 const { htmlProps, ...context } = useFormControlProvider ( props ) ;
78
89 const { isDisabled, isInvalid, ...remainingProps } = context ;
Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ export type IFormControlComponentType<
3535 LabelAstrick ,
3636 Helper ,
3737 HelperText
38- > = ( ( props : Root ) => JSX . Element ) & {
38+ > = ( ( props : Root & InterfaceFormControlProps ) => JSX . Element ) & {
3939 Error : React . MemoExoticComponent < ( props : Error ) => JSX . Element > & {
4040 Text : React . MemoExoticComponent < ( props : ErrorText ) => JSX . Element > ;
4141 Icon : React . MemoExoticComponent < ( props : ErrorIcon ) => JSX . Element > ;
@@ -48,3 +48,4 @@ export type IFormControlComponentType<
4848 Text : React . MemoExoticComponent < ( props : HelperText ) => JSX . Element > ;
4949 } ;
5050} ;
51+ export type IFormControlProps = InterfaceFormControlProps ;
Original file line number Diff line number Diff line change 23582358 "@react-native-aria/focus" "^0.2.7"
23592359 react-native-svg "13.4.0"
23602360
2361+ "@gluestack-ui/
[email protected] ":
2362+ version "0.1.0"
2363+ resolved "https://registry.yarnpkg.com/@gluestack-ui/select/-/select-0.1.0.tgz#d7c23cb027323ed971f1c54937edd98c2c6b32ab"
2364+ integrity sha512-I92KGTVF41Og6g22EraaCfoCSZ9hdjPs8lx2o+IGUKRelgdcDk0Mqp04wDaCLn4eSUeQgwpp2jNowpFQ46ZlEw==
2365+ dependencies:
2366+ "@gluestack-ui/hooks" latest
2367+ "@gluestack-ui/react-native-aria" latest
2368+ "@gluestack-ui/utils" latest
2369+ "@react-native-aria/focus" "^0.2.7"
2370+ react-native-svg "13.4.0"
2371+
23612372"@gluestack-ui/
[email protected] ":
23622373 version "0.1.1"
23632374 resolved "https://registry.yarnpkg.com/@gluestack-ui/slider/-/slider-0.1.1.tgz#a3417195a6fea6f7cd2a6bdf8cfdf23ccd65481b"
You can’t perform that action at this time.
0 commit comments