segmentio / evergreen

🌲 Evergreen React UI Framework by Segment
https://evergreen.segment.com
MIT License
12.39k stars 832 forks source link

Textareafield resize prop #1339

Closed brandongregoryscott closed 3 years ago

brandongregoryscott commented 3 years ago

Overview

Resolves #1338 TextareaField does not pass through resize prop

Updates the TextareaField component to plumb through the resize prop. Updated storybook stories and added a few basic tests.

Documentation

netlify[bot] commented 3 years ago

✔️ Deploy Preview for evergreen-storybook ready!

🔨 Explore the source changes: 81fbc8a6ce0a95a0782f34e3199d51a16a05cdfc

🔍 Inspect the deploy log: https://app.netlify.com/sites/evergreen-storybook/deploys/615ca737d1e23e00078a5c93

😎 Browse the preview: https://deploy-preview-1339--evergreen-storybook.netlify.app

akleiner2 commented 3 years ago

One of the things that you should be able to check is expect(textarea).toHaveStyle({ resize: 'none' }) (or something similar...maybe using window.computedStyle). That way, we don't care about what the actual classname is or how it's applied, but rather that the textarea has that property set on it.

brandongregoryscott commented 3 years ago

That test is way better - thanks for helping me clean that up! 😄