Skip to content

Commit

Permalink
Don't show empty arg tables in doc pages
Browse files Browse the repository at this point in the history
  • Loading branch information
kasperpeulen committed Feb 26, 2024
1 parent 8c027ac commit 21ce941
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion code/ui/blocks/src/blocks/Controls.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,10 @@ export const Controls: FC<ControlsProps> = (props) => {

const hasSubcomponents = Boolean(subcomponents) && Object.keys(subcomponents).length > 0;

if (!hasSubcomponents) {
if (
!hasSubcomponents &&
(Object.keys(filteredArgTypes).length > 0 || Object.keys(args).length > 0)
) {
return (
<PureArgsTable
rows={filteredArgTypes}
Expand Down

0 comments on commit 21ce941

Please sign in to comment.