palantir/blueprint

Generically typed selection UI

開放

#6,695 建立於 2024年2月1日

 (0 則留言) (2 個反應) (0 位負責人)TypeScript (2,167 個分叉)batch import
Status: needs proposalType: feature requesthelp wanted

倉庫指標

星標
 (20,263 顆星)
PR 合併指標
 (PR 指標待抓取)

描述

Feature request

Would be nice to have a selection UI that works with enums. SegmentedControl is nice but the callback is always string

Examples

const options: {label: string, value: MyEnum} = {...};

const handleValueChange = (newValue: MyEnum) => {...};

... 

<SegmentedControl<MyEnum> options={options} onValueChange={handleValueChange}>
...
</SegmentedControl>

貢獻者指南