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>

贡献者指南