// Copyright 2019 @polkadot/extension-ui authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. import React from 'react'; import styled from 'styled-components'; import Label from './Label'; import defaults from './defaults'; interface Props { className?: string; isError?: boolean; isFocussed?: boolean; isReadOnly?: boolean; rowsCount?: number; label: string; onChange?: (value: string) => void; value?: string; } function TextArea ({ className, isFocussed, isReadOnly, label, onChange, value, rowsCount }: Props): React.ReactElement { const _onChange = ({ target: { value } }: React.ChangeEvent): void => { onChange && onChange(value.trim()); }; return (