Skip to content

Commit

Permalink
chore(symbol): better explanation for breaking changes
Browse files Browse the repository at this point in the history
bartholomej committed Aug 29, 2020
1 parent 8faad93 commit db19f6c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions projects/ngx-scrolltop/src/lib/ngx-scrolltop.component.ts
Original file line number Diff line number Diff line change
@@ -15,9 +15,12 @@ export class NgxScrollTopComponent {
@Input() public backgroundColor: string;
@Input() public symbolColor: string;
@Input() public size: number;
@Input() public set symbol(value: string) {
@Input() public set symbol(symbol: string) {
console.error(
'NgxScrollTop: Symbol input `[symbol]="\'↑\'"` is deprecated.\n\r Use `Content projection` instead. E.g. <ngx-scrolltop>↑</ngx-scrolltop>.\n\r More info: https://github.com/bartholomej/ngx-scrolltop#symbol'
`NgxScrollTop: You are trying to set \`${symbol}\` as your symbol but Input \`[symbol]="\'↑\'"\` is deprecated now.\n\r`,
`Use \`Content projection\` method, like this:\n\r\n\r`,
`<ngx-scrolltop>${symbol}</ngx-scrolltop>\n\r\n\r`,
`More info: https://github.com/bartholomej/ngx-scrolltop#symbol`
);
}
@Input() public position: NgxScrollTopPosition = 'right';

0 comments on commit db19f6c

Please sign in to comment.