Skip to content

Commit

Permalink
feat(text-field): use content prop
Browse files Browse the repository at this point in the history
  • Loading branch information
andresz1 committed Jun 16, 2023
1 parent 19f9df1 commit 5cb5b47
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions packages/components/text-field/src/TextField.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@ import { TextFieldFloatingLabel } from './TextFieldFloatingLabel'
import { TextFieldLegend } from './TextFieldLegend'

export interface TextFieldProps
extends Omit<InputProps, 'intent'>,
extends Omit<InputProps, 'intent' | 'content'>,
Pick<InputContainerProps, 'intent'> {
content?: ReactNode
requiredIndicator?: ReactNode
label: string
}
Expand All @@ -32,9 +33,9 @@ export const TextField = forwardRef<HTMLInputElement, TextFieldProps>(
label,
intent: intentProp = 'neutral',
requiredIndicator,
content,
disabled,
required,
children,
...others
},
forwardedRef
Expand Down Expand Up @@ -93,7 +94,8 @@ export const TextField = forwardRef<HTMLInputElement, TextFieldProps>(
onChange={handleChange}
{...others}
/>
{children}

{content}

<TextFieldFieldset intent={intent} isDisabled={isDisabled}>
<TextFieldLegend
Expand Down

0 comments on commit 5cb5b47

Please sign in to comment.