Skip to content

create a custom icon-button directive #3458

@sleidig

Description

@sleidig

We often use buttons with a combination of icon and text. This requires some special classes, imports and translation tags to keep in mind. Centralize this in a reusable custom component.

Current use:

<button
  mat-stroked-button
  (click)="action()"
>
  <fa-icon icon="edit" class="standard-icon-with-text"></fa-icon>
  <span i18n>Edit data</span>
</button>

Intended use with new directive:

<button
  app-icon-button="edit"
  (click)="action()"
  i18n
>
  Edit data
</button>

Metadata

Metadata

Assignees

Labels

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions