kirbydesign / designsystem

Kirby Design System
https://cookbook.kirby.design
MIT License
83 stars 22 forks source link

[Enhancement] custom sized icons #3356

Closed troelslenda closed 6 months ago

troelslenda commented 6 months ago

Describe the enhancement

Problem

I'd like to use an icon in a different aspect ratio than the regular 1:1. I cannot interact with ion-icon as intended by providing styling directly as advised reading the documentiation on https://github.com/ionic-team/ionicons

I'd like to use kirby icon for convenience not having to implement icon registry alongside kirby.

Therefore I would like to have a property to set a fixed size for icons.

Describe the solution you'd like

I think that an optional property on icon.component.ts to force size would be ideal. eg

  @Input() forceSize?: {
    width: number,
    height: number
  };

and then pass these properties along to ion-icon

Have you considered any alternatives?

Are there any additional context?


Checklist:

The following tasks should be carried out in sequence in order to follow the process of contributing correctly.

Refinement

Implementation

The contributor who wants to implement this issue should:

Review

Once the issue has been implemented and is ready for review:

troelslenda commented 6 months ago

I found that a better solution was to use ion-icon directly.