kirbydesign / designsystem

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

[Enhancement] Generic SegmentedControl #3453

Closed mikkel-ol closed 2 months ago

mikkel-ol commented 2 months ago

Describe the enhancement

SegmentedControl should be generic to allow narrow types to be passed to items and value while being passed back to segmentSelect()

Describe the solution you'd like

Let component SegmentedControl be generic but extend existing and required type SegmentItem and use the generic for items and output segmentSelect

Have you considered any alternatives?

No

Are there any additional context?

No

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: