Skip to content

Commit 6b02186

Browse files
authored
Merge pull request #266 from gluestack/release/@gluestack-ui/[email protected]
Release/@gluestack UI/form [email protected]
2 parents a782ffc + 38560c9 commit 6b02186

File tree

5 files changed

+23
-4
lines changed

5 files changed

+23
-4
lines changed

packages/form-control/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# @gluestack-ui/form-control
22

3+
## 0.1.2
4+
5+
### Patch Changes
6+
7+
- Added typings
8+
39
## 0.1.1
410

511
### Patch Changes

packages/form-control/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@gluestack-ui/form-control",
3-
"version": "0.1.1",
3+
"version": "0.1.2",
44
"main": "lib/commonjs/index",
55
"module": "lib/module/index",
66
"types": "lib/typescript/index.d.ts",

packages/form-control/src/FormControl.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
import React, { forwardRef } from 'react';
22
import { 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;

packages/form-control/src/types.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff 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;

yarn.lock

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2358,6 +2358,17 @@
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"

0 commit comments

Comments
 (0)