chore: fix indentation in API tab json for empty nested objects/arrays (#6150)
This commit is contained in:
committed by
GitHub
parent
f6039246c6
commit
57b072edfc
@@ -52,9 +52,9 @@ export const RenderJSON = ({
|
||||
const objectKeys = object ? Object.keys(object) : []
|
||||
const objectLength = objectKeys.length
|
||||
const [isOpen, setIsOpen] = React.useState<boolean>(true)
|
||||
|
||||
const isNestedAndEmpty = isEmpty && (parentType === 'object' || parentType === 'array')
|
||||
return (
|
||||
<li>
|
||||
<li className={isNestedAndEmpty ? `${baseClass}__row-line--nested` : ''}>
|
||||
<button
|
||||
aria-label="toggle"
|
||||
className={`${baseClass}__list-toggle ${isEmpty ? `${baseClass}__list-toggle--empty` : ''}`}
|
||||
|
||||
Reference in New Issue
Block a user