diff --git a/.changeset/late-rings-poke.md b/.changeset/late-rings-poke.md new file mode 100644 index 0000000000..6da9e43fc0 --- /dev/null +++ b/.changeset/late-rings-poke.md @@ -0,0 +1,6 @@ +--- +'@twilio-paste/textarea': major +'@twilio-paste/core': major +--- + +[Textarea] Update textarea to use @twilio-paste/react-autosize-textarea library and add the resize prop which allows users to resize the textarea height. diff --git a/.changeset/slow-buttons-film.md b/.changeset/slow-buttons-film.md new file mode 100644 index 0000000000..a64ad36720 --- /dev/null +++ b/.changeset/slow-buttons-film.md @@ -0,0 +1,6 @@ +--- +'@twilio-paste/core': major +'@twilio-paste/react-textarea-autosize-library': major +--- + +[react-textarea-autosize-library] add react-textarea-autosize library diff --git a/.codesandbox/ci.json b/.codesandbox/ci.json index a89a9de051..cc85f6f33f 100644 --- a/.codesandbox/ci.json +++ b/.codesandbox/ci.json @@ -51,6 +51,7 @@ "/packages/paste-core/components/paragraph", "/packages/paste-core/components/popover", "/packages/paste-core/components/radio-group", + "/packages/paste-libraries/react-textarea-autosize", "/packages/paste-libraries/reakit", "/packages/paste-core/components/screen-reader-only", "/packages/paste-core/components/select", diff --git a/packages/paste-core/components/textarea/__tests__/textarea.test.tsx b/packages/paste-core/components/textarea/__tests__/textarea.test.tsx index 347dda2ba4..2e88e8b809 100644 --- a/packages/paste-core/components/textarea/__tests__/textarea.test.tsx +++ b/packages/paste-core/components/textarea/__tests__/textarea.test.tsx @@ -6,7 +6,7 @@ import {HelpText} from '@twilio-paste/help-text'; // @ts-ignore typescript doesn't like js imports import axe from '../../../../../.jest/axe-helper'; import {TextArea} from '../src'; -import {CustomizedTextarea} from '../stories/textarea.stories'; +import {CustomizedTextarea, MultipleTextareas} from '../stories/textarea.stories'; const NOOP = (): void => {}; @@ -23,6 +23,11 @@ describe('TextArea render', () => { expect(getByRole('textbox')).not.toBeNull(); }); + it('should render a hidden textarea', () => { + render(