Skip to content

Commit

Permalink
refactor(textarea): update textarea to 7.x (carbon-design-system#513)
Browse files Browse the repository at this point in the history
* refactor(textarea): update textarea to 7.x

* refactor(textarea): wrap textarea in bx--form-item
  • Loading branch information
tw15egan authored and Christopher A. Dhanaraj committed Apr 3, 2017
1 parent 5281f07 commit 8e93275
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions components/TextArea.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,15 @@ const Textarea = ({ className, id, labelText, onChange, onClick, ...other }) =>
},
};

const textareaClasses = classNames('bx--textarea__input', className);
const textareaClasses = classNames('bx--text-area', className);
const label = labelText ? (
<label htmlFor={id} className="bx--form__label">
<label htmlFor={id} className="bx--label">
{labelText}
</label>
) : null;

return (
<div>
<div className="bx--form-item">
{label}
<textarea
{...other}
Expand Down
4 changes: 2 additions & 2 deletions components/__tests__/TextArea-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ describe('Textarea', () => {
});

it('has the expected classes', () => {
expect(textarea.hasClass('bx--textarea__input')).toEqual(true);
expect(textarea.hasClass('bx--text-area')).toEqual(true);
});

it('applies extra classes specified via className', () => {
Expand Down Expand Up @@ -76,7 +76,7 @@ describe('Textarea', () => {
});

it('has the expected classes', () => {
expect(renderedLabel.hasClass('bx--form__label')).toEqual(true);
expect(renderedLabel.hasClass('bx--label')).toEqual(true);
});
});
});
Expand Down

0 comments on commit 8e93275

Please sign in to comment.