Skip to content

Commit

Permalink
fix: pass i18n to anchors component, fix attr title closes #32
Browse files Browse the repository at this point in the history
  • Loading branch information
scttcper committed Mar 30, 2018
1 parent 27c3c35 commit a8d02f3
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/lib/picker/anchors.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import SVGs from './svgs';
<ng-container *ngFor="let category of categories; let idx = index">
<span
*ngIf="category.anchor !== false"
title="i18n.categories[category.id]"
[attr.title]="i18n.categories[category.id]"
(click)="this.handleClick($event, idx)"
class="emoji-mart-anchor"
[class.emoji-mart-anchor-selected]="category.name === selected"
Expand All @@ -43,6 +43,7 @@ export class AnchorsComponent {
@Input() categories: EmojiCategory[] = [];
@Input() color?: string;
@Input() selected?: string;
@Input() i18n: any;
@Output() anchorClick = new EventEmitter<{ category: EmojiCategory, index: number }>();
svgs: any = SVGs;

Expand Down
1 change: 1 addition & 0 deletions src/lib/picker/picker.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
(anchorClick)="handleAnchorClick($event)"
[color]="color"
[selected]="selected"
[i18n]="i18n"
>
</emoji-mart-anchors>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/lib/picker/picker.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import { measureScrollbar } from './utils';



const I18N = {
const I18N: any = {
search: 'Search',
notfound: 'No Emoji Found',
categories: {
Expand Down

0 comments on commit a8d02f3

Please sign in to comment.