palantir/blueprint

Generically typed selection UI

オープン

#6,695 opened on 2024/02/01

 (0 件のコメント) (2 件のリアクション) (0 人の担当者)TypeScript (2,167 件のフォーク)batch import
Status: needs proposalType: feature requesthelp wanted

Repository metrics

Stars
 (20,263 個のスター)
PR merge metrics
 (平均マージ 43d 10h) (30d で 27 merged PRs)

説明

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>

コントリビューターガイド