Sonsino, Ofir (os0695) | ff76b5e | 2018-07-10 15:57:37 +0300 | [diff] [blame] | 1 | import { Component, Input } from '@angular/core'; |
| 2 | |
| 3 | @Component({ |
| 4 | selector : 'custom-ellipsis', |
| 5 | template: ` |
| 6 | <span |
| 7 | class="ellipsis" |
| 8 | id="{{id}}" |
| 9 | tooltip="{{value}}">{{value}}</span>`, |
| 10 | styles : [ |
| 11 | ` |
| 12 | .ellipsis { |
| 13 | white-space: nowrap; |
| 14 | overflow: hidden; |
| 15 | text-overflow: ellipsis; |
| 16 | display: inline-block; |
| 17 | width: 99%; |
| 18 | text-align: left; |
| 19 | } |
| 20 | ` |
| 21 | ] |
| 22 | }) |
| 23 | export class EllipsisComponent { |
| 24 | @Input() value : string; |
| 25 | @Input() id : string; |
| 26 | |
| 27 | } |