# All files / src/TextArea TextArea.tsx

100% Statements 8/8
100% Branches 2/2
100% Functions 1/1
100% Lines 6/6

Press n or j to go to the next uncovered block, b, p or k for the previous block.

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    287x

    7x

    7x

    11x
    11x

    7x
     import React from 'react'
    import { TextAreaAttributes } from '../_utils/types'
    import { StyledTextArea } from './TextArea.styles'
    import { TextAreaProps } from './TextArea.types'

    /**

     Text areas give our users space to input unformatted text. All text areas are
     manually expandable by dragging the bottom right corner to the desired size.

     If users need to add formatted text, see Text Editor.

     @since 10.19.0

     @see [Storybook](https://procore.github.io/core/core-react/latest/?path=/story/demos-textarea--demo)

     @see [Design Guidelines](https://design.procore.com/text-area)

     */
    export const TextArea = React.forwardRef<
      HTMLTextAreaElement,
      TextAreaAttributes & TextAreaProps
    >(function TextArea({ resize = 'both', ...props }, ref) {
      return <StyledTextArea resize={resize} {...props} ref={ref} />
    })

    TextArea.displayName = 'TextArea'