Skip to content

Commit

Permalink
fix(form): Added missing containerProps to TextArea
Browse files Browse the repository at this point in the history
  • Loading branch information
mlaursen committed Jan 12, 2021
1 parent 3c10a1c commit 695fd2a
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions packages/form/src/text-field/TextArea.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import React, {
CSSProperties,
forwardRef,
HTMLAttributes,
ReactElement,
ReactNode,
Ref,
Expand Down Expand Up @@ -112,6 +113,15 @@ export interface TextAreaProps
* default ref is forwarded on to the `input` element.
*/
containerRef?: Ref<HTMLDivElement>;

/**
* Any additional html attributes that should be applied to the main container
* div. This is probably only going to be used internally so that additional
* accessibility can be added to text fields for more complex widgets.
*
* @since 2.5.2
*/
containerProps?: Omit<HTMLAttributes<HTMLDivElement>, "style" | "className">;
}

const block = bem("rmd-textarea");
Expand All @@ -130,6 +140,7 @@ export const TextArea = forwardRef<HTMLTextAreaElement, TextAreaProps>(
areaStyle,
areaClassName,
containerRef,
containerProps,
label,
labelStyle,
labelClassName,
Expand Down Expand Up @@ -317,6 +328,7 @@ export const TextArea = forwardRef<HTMLTextAreaElement, TextAreaProps>(

return (
<TextFieldContainer
{...containerProps}
style={{
...style,
height: height
Expand Down

0 comments on commit 695fd2a

Please sign in to comment.