You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be cool if to add nested controls support using dot notation (.) when using a knob from useControls(), example:
importReactfrom'react'import{useControls}from'@itsjonq/controls'constExample=()=>{const{ text }=useControls()text('Button.mainColor','red')return<div>...</div>}
This would render a UI like this (within the <Controls />)
Button
<input type="text" value="red" />
The UI can be collapsible, but should not be collapsed by default. This will allow for fields to be better organized :).
There should be a limitation though... It can only nest 1 level deep.
Accessing the attributes can use the dot notation as well, example:
Maybe we can provide a special get method as well, example:
importReactfrom'react'import{useControls}from'@itsjonq/controls'constExample=()=>{const{ text, get }=useControls()text('Button.mainColor','red')constvalue=get('Button.mainColor')return<div>...</div>}
The text was updated successfully, but these errors were encountered:
It would be cool if to add nested controls support using dot notation (
.
) when using a knob fromuseControls()
, example:This would render a UI like this (within the
<Controls />
)Button
The UI can be collapsible, but should not be collapsed by default. This will allow for fields to be better organized :).
There should be a limitation though... It can only nest 1 level deep.
Accessing the
attributes
can use the dot notation as well, example:Maybe we can provide a special
get
method as well, example:The text was updated successfully, but these errors were encountered: