diff --git a/lib/src/components/personSearch/PersonSearch.stories.tsx b/lib/src/components/personSearch/PersonSearch.stories.tsx index 5b5bc43e7..9d0b28016 100644 --- a/lib/src/components/personSearch/PersonSearch.stories.tsx +++ b/lib/src/components/personSearch/PersonSearch.stories.tsx @@ -13,7 +13,7 @@ export default { export function PersonSearch(args: any) { const getPerson = () => ({ name: faker.name.findName(), - subtitle: faker.internet.email(), + email: faker.internet.email(), avatar: faker.image.avatar(), selected: faker.random.boolean() }); diff --git a/lib/src/components/personSearch/PersonSearch.tsx b/lib/src/components/personSearch/PersonSearch.tsx index f760f5235..ad536808c 100644 --- a/lib/src/components/personSearch/PersonSearch.tsx +++ b/lib/src/components/personSearch/PersonSearch.tsx @@ -33,6 +33,7 @@ export function PersonSearch({ onBlur={() => (showContent ? null : toggleShowContent(true))} onChange={(e: any) => setSearchValue(e.target.value)} value={searchValue} + size={Input.sizes.md} /> )} diff --git a/lib/src/modules/input/Input.tsx b/lib/src/modules/input/Input.tsx index 3ff13195a..a0e899d96 100644 --- a/lib/src/modules/input/Input.tsx +++ b/lib/src/modules/input/Input.tsx @@ -2,11 +2,18 @@ import * as React from "react"; import cx from "classnames"; import { InputHelper } from "./InputHelper"; -interface Props extends React.InputHTMLAttributes { +const sizes = { + md: "md", + sm: "sm", +} as const; + +interface Props + extends Omit, "size"> { valid?: boolean; invalid?: boolean; enhanceNativeSupport?: boolean; inputRef?: React.RefObject; + size?: (typeof sizes)[keyof typeof sizes]; } export function Input({ @@ -51,10 +58,4 @@ export function Input({ } Input.Helper = InputHelper; - -const sizes = { - md: "md", - sm: "sm", -}; - Input.sizes = sizes;