diff --git a/editor/src/components/inspector/common/property-path-hooks.ts b/editor/src/components/inspector/common/property-path-hooks.ts index a7d077cff2bf..808dfa482ee4 100644 --- a/editor/src/components/inspector/common/property-path-hooks.ts +++ b/editor/src/components/inspector/common/property-path-hooks.ts @@ -1161,6 +1161,7 @@ const StyleSubSectionForType: { [key: string]: SubSectionAvailable } = { background: subSectionAllowAll, img: subSectionPermitList(['img']), transform: subSectionAllowAll, + overflow: subSectionDenyList(['img', 'video']), } const PropsToDiscard = [...UtopiaKeys, 'skipDeepFreeze', 'data-utopia-instance-path'] diff --git a/editor/src/components/inspector/sections/style-section/container-subsection/overflow-row.tsx b/editor/src/components/inspector/sections/style-section/container-subsection/overflow-row.tsx index 816f95c6b84e..69af2238977a 100644 --- a/editor/src/components/inspector/sections/style-section/container-subsection/overflow-row.tsx +++ b/editor/src/components/inspector/sections/style-section/container-subsection/overflow-row.tsx @@ -2,7 +2,7 @@ import React from 'react' import * as PP from '../../../../../core/shared/property-path' import { PropertyLabel } from '../../../widgets/property-label' import { UIGridRow } from '../../../widgets/ui-grid-row' -import { useInspectorStyleInfo } from '../../../common/property-path-hooks' +import { useInspectorStyleInfo, useIsSubSectionVisible } from '../../../common/property-path-hooks' import type { OptionChainOption } from '../../../controls/option-chain-control' import { OptionChainControl } from '../../../controls/option-chain-control' import { InspectorContextMenuItems, InspectorContextMenuWrapper } from '../../../../../uuiui-deps' @@ -23,6 +23,8 @@ const OverflowControlOptions: Array> = [ ] export const OverflowRow = React.memo(() => { + const isVisible = useIsSubSectionVisible('overflow') + const { value, controlStatus, controlStyles, onSubmitValue, onUnsetValues } = useInspectorStyleInfo('overflow') @@ -32,6 +34,10 @@ export const OverflowRow = React.memo(() => { onUnsetValues, ) + if (!isVisible) { + return null + } + return (