From 9e4f9f42523b1565ff774070f4c4091769822843 Mon Sep 17 00:00:00 2001 From: Elizabeth Craig Date: Tue, 14 Dec 2021 17:15:50 -0800 Subject: [PATCH] update children type --- packages/react-input/etc/react-input.api.md | 1 + packages/react-input/src/components/Input/Input.types.ts | 3 +++ 2 files changed, 4 insertions(+) diff --git a/packages/react-input/etc/react-input.api.md b/packages/react-input/etc/react-input.api.md index 6c7b129c4ff15..c99d409200f3e 100644 --- a/packages/react-input/etc/react-input.api.md +++ b/packages/react-input/etc/react-input.api.md @@ -23,6 +23,7 @@ export type InputOnChangeData = { // @public export type InputProps = Omit, 'children' | 'defaultValue' | 'onChange' | 'size' | 'value'> & { + children?: never; size?: 'small' | 'medium' | 'large'; inline?: boolean; appearance?: 'outline' | 'underline' | 'filledDarker' | 'filledLighter'; diff --git a/packages/react-input/src/components/Input/Input.types.ts b/packages/react-input/src/components/Input/Input.types.ts index 30617d2e78606..d45012dd36d48 100644 --- a/packages/react-input/src/components/Input/Input.types.ts +++ b/packages/react-input/src/components/Input/Input.types.ts @@ -35,6 +35,9 @@ export type InputProps = Omit< // `children` is unsupported. The rest of these native props have customized definitions. 'children' | 'defaultValue' | 'onChange' | 'size' | 'value' > & { + /** Input can't have children. */ + children?: never; + /** * Size of the input (changes the font size and spacing). * @default 'medium'