diff --git a/README.md b/README.md index 71928e4..20e56a4 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,10 @@ ***angular2-stretchy*** is an Angular2 directive that automatically adjusts input width to fit content. +## Demo: + +https://tudorgergely.github.io/angular2-stretchy/ + ## Installation: ```bash @@ -42,4 +46,4 @@ Set normal styling on input such as min-width ## Licence -This project is licensed under the MIT license. See the [LICENSE](LICENSE) file for more info. \ No newline at end of file +This project is licensed under the MIT license. See the [LICENSE](LICENSE) file for more info. diff --git a/package.json b/package.json index 92eebb9..4c0294b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "angular2-stretchy", - "version": "1.0.0", + "version": "1.0.1", "description": "Angular 2 directive to make input have a dynamic width", "main": "index.ts", "author": "Tudor Gergely ", diff --git a/stretchy.directive.ts b/stretchy.directive.ts index b7c0a96..3556553 100644 --- a/stretchy.directive.ts +++ b/stretchy.directive.ts @@ -7,6 +7,11 @@ export class StretchyDirective implements OnInit { @HostBinding('style.width.px') private inputWidth: number = 0; + @HostBinding('style.box-sizing') + private get boxSizing() { + return 'content-box'; + } + private sizeDiv; constructor(private renderer: Renderer,