From a1352e9933f3dea8a089e46a5786d484130aa265 Mon Sep 17 00:00:00 2001 From: georgewrmarshall Date: Mon, 24 Jul 2023 15:32:44 -0700 Subject: [PATCH] Adjusting types and fixing design system import --- ui/components/component-library/input/README.mdx | 2 +- ui/components/component-library/input/input.tsx | 4 ++-- ui/components/component-library/input/input.types.ts | 3 ++- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/ui/components/component-library/input/README.mdx b/ui/components/component-library/input/README.mdx index fc8559cbe034..a45c1244bcf5 100644 --- a/ui/components/component-library/input/README.mdx +++ b/ui/components/component-library/input/README.mdx @@ -12,7 +12,7 @@ import { Input } from './input'; ## Props -The `Input` accepts all props below as well as all [Box](/docs/components-ui-box--default-story#props) component props +The `Input` accepts all props below as well as all [Box](/docs/components-componentlibrary-box--docs#props) component props diff --git a/ui/components/component-library/input/input.tsx b/ui/components/component-library/input/input.tsx index ecf649f8f0b5..5ff59c7a696b 100644 --- a/ui/components/component-library/input/input.tsx +++ b/ui/components/component-library/input/input.tsx @@ -7,7 +7,7 @@ import { BorderStyle, } from '../../../helpers/constants/design-system'; -import { Text } from '..'; +import { Text, TextProps } from '../text'; import { PolymorphicRef } from '../box'; import { InputProps, InputType, InputComponent } from './input.types'; @@ -70,7 +70,7 @@ export const Input: InputComponent = React.forwardRef( value={value} variant={textVariant} type={type} - {...props} + {...(props as TextProps)} /> ), ); diff --git a/ui/components/component-library/input/input.types.ts b/ui/components/component-library/input/input.types.ts index f9a0747260ba..6d0c5fe26d40 100644 --- a/ui/components/component-library/input/input.types.ts +++ b/ui/components/component-library/input/input.types.ts @@ -2,7 +2,8 @@ import type { StyleUtilityProps, PolymorphicComponentPropWithRef, } from '../box'; -import { TextVariant } from 'ui/helpers/constants/design-system'; + +import { TextVariant } from '../../../helpers/constants/design-system'; export enum InputType { Text = 'text',