kirbydesign / designsystem

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

Segmented Control: allow passing narrower types as SegmentItem #3466

Closed mikkel-ol closed 1 month ago

mikkel-ol commented 1 month ago

Which issue does this PR close?

This PR closes #3453

What is the new behavior?

Type passed to items will be passed back with segmentSelect()

Does this PR introduce a breaking change?

Are there any additional context?

A custom implementation of NoInfer has to be introduced until TypeScript 5.4 has been upgraded to which provide built-in support for NoInfer

The property isCustomIcon on SegmentItem has been removed since it was seemingly unused. This eliminates the need for SegmentItemInternal as well.

Checklist:

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

Reminders

Review

When the pull request has been approved it will be merged to develop by Team Kirby.