Skip to content
PACKAGES

blockMaxWidth()

Resolve the effective maximum width for a block.

import { blockMaxWidth } from "@graphrefly/ts/solutions/reactive-layout";
function blockMaxWidth(
blockMaxWidth: number | undefined,
maxWidth: number,
): number
ParameterTypeDescription
blockMaxWidthnumber | undefinedBlock-specific maximum width.
maxWidthnumberLayout-wide maximum width.

The tighter width constraint.

blockMaxWidth(120, 80);

packages/ts/src/solutions/reactive-layout/utils.ts