palantir/blueprint

Generically typed selection UI

Open

#6,695 opened on 2024年2月1日

GitHub で見る
 (0 comments) (2 reactions) (0 assignees)TypeScript (20,263 stars) (2,167 forks)batch import
Status: needs proposalType: feature requesthelp wanted

説明

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>

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