Skip to content

Commit

Permalink
feat(BadgeComponent): Added customStyle parameter
Browse files Browse the repository at this point in the history
Notes:
customStyle parameter allows to inject custom styles into the component
  • Loading branch information
goncaloacbsilva committed Aug 17, 2022
1 parent ad616d8 commit 89bb9aa
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ export type BadgeSize = 'xs' | 'sm';
? 'rounded px-2 py-0.5'
: size === 'xs'
? 'rounded-full p-1'
: 'rounded-full p-1.5'
: 'rounded-full p-1.5',
customStyle
]"
[routerLink]="href"
>
Expand All @@ -38,6 +39,7 @@ export class BadgeComponent {
@Input() size: BadgeSize = 'xs';
@Input() href?: string;
@Input() iconOnly = false;
@Input() customStyle = '';

colorClasses: Record<BadgeColor, string> = {
blue: 'bg-blue-100 text-blue-800 dark:bg-blue-200 dark:text-blue-800 group-hover:bg-blue-200 dark:group-hover:bg-blue-300',
Expand Down

0 comments on commit 89bb9aa

Please sign in to comment.