Skip to content

Commit

Permalink
fix(textarea): fixes default textarea width to be 100%
Browse files Browse the repository at this point in the history
Fixes the default area to be 100% if cols is not specified

fix #30
  • Loading branch information
Asif Ahmed committed May 7, 2020
1 parent ef9253a commit b475c35
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/components/textarea/textarea.scss
Original file line number Diff line number Diff line change
Expand Up @@ -134,3 +134,8 @@ label {
::-ms-input-placeholder {
color: var(--color-smoke-300);
}

.responsive {
width: 100%;
box-sizing: border-box;
}
3 changes: 3 additions & 0 deletions src/components/textarea/textarea.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,9 @@ export class Textarea {
[this.state]: true,
}}>
<textarea
class={{
'responsive': this.cols === undefined,
}}
ref={input => this.nativeInput = input}
disabled={this.disabled}
name={this.name}
Expand Down

0 comments on commit b475c35

Please sign in to comment.