diff --git a/packages/status-react/src/system/text-input/text-input.tsx b/packages/status-react/src/system/text-input/text-input.tsx index 5cd3b25f..96199707 100644 --- a/packages/status-react/src/system/text-input/text-input.tsx +++ b/packages/status-react/src/system/text-input/text-input.tsx @@ -1,6 +1,7 @@ import React, { forwardRef } from 'react' import { Box } from '../box' +import { Text } from '../text' import { Base } from './styles' import type { Ref } from 'react' @@ -10,11 +11,13 @@ type InputProps = React.InputHTMLAttributes interface Props { id?: string name?: string + label?: string type?: InputProps['type'] value?: string defaultValue?: string onChange?: InputProps['onChange'] onBlur?: InputProps['onBlur'] + onClick?: InputProps['onClick'] disabled?: boolean readOnly?: boolean required?: boolean @@ -28,9 +31,16 @@ interface Props { } const TextInput = (props: Props, ref: Ref) => { + const { label, ...inputProps } = props + return ( - + {label && ( + + {label} + + )} + ) }