Skip to content

Commit

Permalink
fix(form-control): remove obsolete props (#2591)
Browse files Browse the repository at this point in the history
  • Loading branch information
TimKolberger committed Nov 23, 2020
1 parent 3b4b5e3 commit ff10bce
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 11 deletions.
6 changes: 6 additions & 0 deletions .changeset/nasty-bottles-run.md
@@ -0,0 +1,6 @@
---
"@chakra-ui/form-control": patch
---

Remove nonfunctional props `errorText` and `helperText` from FormControl props
type definition
15 changes: 4 additions & 11 deletions packages/form-control/src/form-control.tsx
Expand Up @@ -47,14 +47,6 @@ interface FormControlContext extends FormControlOptions {
* requested for a text field.
*/
label?: string
/**
* The error message to be displayed when `isInvalid` is set to `true`
*/
errorText?: string
/**
* The assistive text to be displayed that provides additional guidance to users
*/
helperText?: string
/**
* The custom `id` to use for the form control. This is passed directly to the form element (e.g, Input).
* - The form element (e.g Input) gets the `id`
Expand All @@ -70,9 +62,10 @@ type ControlContext = Omit<
"htmlProps"
>

const [FormControlProvider, useFormControlContext] = createContext<
ControlContext
>({
const [
FormControlProvider,
useFormControlContext,
] = createContext<ControlContext>({
strict: false,
name: "FormControlContext",
})
Expand Down

0 comments on commit ff10bce

Please sign in to comment.