# All files / components/TextArea TextArea.js

75% Statements 3/4
100% Branches 0/0
0% Functions 0/1
75% Lines 3/4

    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
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50

    5x

    5x

    5x

    import PropTypes from 'prop-types';
    import styled from 'styled-components';
    import get from 'extensions/themeGet';

    const TextArea = styled.textarea`
      background: ${get('colors.background.default')};
      color: ${get('colors.text.default')};
      font-size: 14px;
      font-weight: 400;
      font-family: ${get('fonts.brand')};
      letter-spacing: 0.02em;
      border-color: ${get('colors.border.light')};
      border-width: ${get('thicknesses.normal')};
      border-style: solid;
      line-height: 1.5;
      min-height: 100px;
      box-shadow: none;
      transition: all 0.2s ease;
      outline: none;
      width: 100%;
      height: ${props => props.height};
    `;

    TextArea.propTypes = {
      /**
       * Adds a class name to the element.
       */
      className: PropTypes.string,
      /**
       * Adds an id to the element.
       */
      id: PropTypes.string,
      /**
       * Specifies the height of the element.
       */
      height: PropTypes.string,
    };

    TextArea.defaultProps = {
      className: null,
      id: null,
      height: '100px',
    };

    /**
     * @component
     */
    export default TextArea;