Doist / reactist

Open source React components made with ❤️ by Doist
http://doist.github.io/reactist
MIT License
249 stars 22 forks source link

fix: TextArea now controls the width and only allows resizing vertically #695

Closed gnapse closed 2 years ago

gnapse commented 2 years ago

Short description

Fixes an issue that @engfragui brought up before in the context of their use of Reactist TextArea in the adaptive cards components. The issue then was resolved differently, due to certain circumstances with adaptive cards. But the issue remained. Now it appears again, and it's blocking me from merging https://github.com/Doist/todoist-web/pull/4988.

So here's the fix.

What's the problem and the fix

The text area is incompatible with horizontal resizing alongside us wanting it to stretch horizontally, which is what we want most of the time. This very text area in GitHub where I'm typing this has the same problem. So the fix was to add width: 100%; resize: vertical; to the <textarea /> element of the <TextArea /> component. Everything else in the diff is not about the fix, but a refactor of the CSS modules class name and adding a missing value in storybooks.

PR Checklist

Versioning

A patch release is enough.