import { LayoutEdge, type LayoutNode } from '../layout/node.js' /** * Returns the yoga node's content width (computed width minus padding and * border). */ const getMaxWidth = (yogaNode: LayoutNode): number => { return ( yogaNode.getComputedWidth() - yogaNode.getComputedPadding(LayoutEdge.Left) - yogaNode.getComputedPadding(LayoutEdge.Right) - yogaNode.getComputedBorder(LayoutEdge.Left) - yogaNode.getComputedBorder(LayoutEdge.Right) ) } export default getMaxWidth