Skip to content

Commit

Permalink
fix: удалены пропсы ограничивающие высоту и ширину в textarea
Browse files Browse the repository at this point in the history
  • Loading branch information
Aleksey-dev-crt committed Sep 12, 2023
1 parent 4924136 commit 4e5efea
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 13 deletions.
3 changes: 3 additions & 0 deletions src/components/ui/text-area/text-area.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,11 @@

display: block;
width: 100%;
min-width: 360px;
max-width: 100%;
height: auto;
min-height: 150px;
max-height: 450px;
box-sizing: border-box;
padding: 8px;
border: 0;
Expand Down
9 changes: 0 additions & 9 deletions src/components/ui/text-area/text-area.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@ const cx = classNames.bind(styles);

interface ITextAreaProps extends Omit<InputHTMLAttributes<HTMLTextAreaElement>, 'onChange'> {
errorText?: string
minWidth?: string
maxWidth?: string
minHeight?: string
maxHeight?: string
onChange?: (value: string) => void
rows?: number
}
Expand All @@ -20,10 +16,6 @@ const TextArea = (props: ITextAreaProps): JSX.Element => {
const {
errorText,
onChange,
minWidth,
maxWidth,
minHeight,
maxHeight,
...restProps
} = props;

Expand All @@ -39,7 +31,6 @@ const TextArea = (props: ITextAreaProps): JSX.Element => {
<>
<textarea
className={cx('input', { invalid: !!errorText })}
style={{ minWidth, maxWidth, minHeight, maxHeight }}
onChange={handleChange}
{...restProps}
/>
Expand Down
4 changes: 0 additions & 4 deletions src/pages/contacts/contacts.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -221,10 +221,6 @@ const Contacts: NextPage = () => {
<Form.Field>
<TextArea
value={message.value}
minWidth="325px"
maxWidth="325px"
minHeight="150px"
maxHeight="450px"
placeholder="Текст сообщения"
errorText={message.wasChanged ? message.error : undefined}
onChange={handleFieldChange('message')}
Expand Down

0 comments on commit 4e5efea

Please sign in to comment.