-
Notifications
You must be signed in to change notification settings - Fork 77
Extend the SliderItem type for value to include React.ReactNode #117
Copy link
Copy link
Open
Description
Problem or feature description:
Extend the SliderItem type for value to include React.ReactNode.
Would be usefull for situatiations like this
<Handle
{...hanleProps}
handle={{
...handle,
value: (
<div
role="button"
tabIndex={0}
style={{ whiteSpace: 'pre' }}
onMouseUp={disableTimeSelectionChange}
onMouseDown={enableTimeSelectionChange}
>
{formatTime(time.selected)}
{formatDate(time.selected)}
</div>
)
}}
/>How change would look
From this:
react-compound-slider/src/types.ts
Lines 3 to 7 in 74e7020
| export interface SliderItem { | |
| id: string; | |
| value: number; | |
| percent: number; | |
| } |
.. to this:
export interface SliderItem {
id: string;
value: number | React.ReactNode;
percent: number;
}Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels