slider
slider copied to clipboard
Add additional data to markers
This PR adds the option to bind additional data to Markers
Coverage increased (+0.03%) to 86.173% when pulling 7e788d1de6caa8db58f94b5a4875e9137876e0e5 on unic:add-additional-data-to-markers into a32ba642cd82e2ca42b95c0cb716838b6f3f999c on react-component:master.
We can pass all the reset properties of mark to the element.
if (markPointIsObject) {
const { label, style, ...resetProps } = markPoint;
}
<span {...resetProps>{label}</span>
There you go 😃 I hope I got your idea
I mean we can write mark prop on the config object directly.
const marks = [{
label: '85°C',
id: 'custom-id',
}];
if (markPointIsObject) {
const { label, style, ...resetProps } = markPoint;
}
<span {...resetProps>{label}</span>
Rebase please.