gpui-kit
gpui-kit copied to clipboard
Add state traits via example Checkbox component
WIP
@maxdeviant Any thoughts on the callbacks in the state traits?
I think including them there means they will be required – I don't know if there is a pattern we can use that makes it so that each individual callback may be implemented, but doesn't have to. Do they need to be separated out into their own traits?
Also any thoughts on the naming pattern?
-
{state}- returns the current {state} -
set_{state- sets the {state} -
on_{some_action}- {some_action} callback
Also let me know if I'm using callback incorrectly 🤣