Closed Rich-Harris closed 3 years ago
It would be nice to be able to add user-defined components. For example leva has this bezier curve editor:
This should work (though haven't tested it yet)...
const values = knobby({ curve: { component: BezierCurveEditor, value: [0.25, 0.1, 0.25, 1] } });
...but in cases where you're dealing with familiar data types throughout your app it might be nice to do this sort of thing instead:
import { knobby, interpret } from 'svelte-knobby'; interpret(value => { if (Array.isArray(value) && value.length === 4 && value.every(x => typeof x === 'number') { return { component: BezierCurveEditor, value }; } }); const values = knobby({ curve: [0.25, 0.1, 0.25, 1] });
Perhaps that's overthinking things though.
We also need a way for components to occupy the full width of the panel and have arbitrary height. now possible
This already works, it just needs to be documented
It would be nice to be able to add user-defined components. For example leva has this bezier curve editor:
This should work (though haven't tested it yet)...
...but in cases where you're dealing with familiar data types throughout your app it might be nice to do this sort of thing instead:
Perhaps that's overthinking things though.
We also need a way for components to occupy the full width of the panel and have arbitrary height.now possible