@@ -301,7 +301,7 @@ const ControlSet = ({ field, properties }: ControlSetProps) => {
301301 const fullField = field ? joinPath ( field , property ) : property
302302
303303 return isFieldsetGroup ( property ) ? (
304- < FieldsetControl key = { property } property = { property } />
304+ < FieldsetControl key = { property } field = { property } />
305305 ) : (
306306 < Control key = { property } field = { fullField } showRemove />
307307 )
@@ -311,15 +311,13 @@ const ControlSet = ({ field, properties }: ControlSetProps) => {
311311}
312312
313313type FieldsetControlProps = {
314- field ?: KeyArg
315- property : string
314+ field : string
316315}
317- const FieldsetControl = ( { field, property } : FieldsetControlProps ) => {
316+ const FieldsetControl = ( { field } : FieldsetControlProps ) => {
318317 const { getField, removeField } = useEditor ( )
319- const styles = getField ( field || property )
318+ const styles = getField ( field )
320319 const properties = Object . keys ( styles )
321-
322- const propertyLabel = addPseudoSyntax ( property )
320+ const label = addPseudoSyntax ( field )
323321
324322 return (
325323 < section
@@ -343,19 +341,19 @@ const FieldsetControl = ({ field, property }: FieldsetControlProps) => {
343341 lineHeight : 1 ,
344342 } }
345343 >
346- { removeInternalCSSClassSyntax ( propertyLabel ) }
344+ { removeInternalCSSClassSyntax ( label ) }
347345 </ h3 >
348- < FieldsetDropdown onRemove = { ( ) => removeField ( field || property ) } />
346+ < FieldsetDropdown onRemove = { ( ) => removeField ( field ) } />
349347 </ div >
350- < GenericFieldset property = { property } >
348+ < GenericFieldset field = { field } >
351349 < div sx = { { pb : 3 } } >
352350 < AddPropertyControl
353- field = { field || property }
351+ field = { field }
354352 styles = { styles }
355- label = { `Add property to ${ propertyLabel } ` }
353+ label = { `Add property to ${ label } ` }
356354 />
357355 </ div >
358- < ControlSet field = { field } properties = { properties } />
356+ < ControlSet properties = { properties } />
359357 </ GenericFieldset >
360358 </ section >
361359 )
0 commit comments