(
node: LayoutNode,
edge: 'top' | 'bottom' | 'left' | 'right',
v: number | `${number}%` | undefined,
)
| 418 | } |
| 419 | |
| 420 | function applyPositionEdge( |
| 421 | node: LayoutNode, |
| 422 | edge: 'top' | 'bottom' | 'left' | 'right', |
| 423 | v: number | `${number}%` | undefined, |
| 424 | ): void { |
| 425 | if (typeof v === 'string') { |
| 426 | node.setPositionPercent(edge, Number.parseInt(v, 10)) |
| 427 | } else if (typeof v === 'number') { |
| 428 | node.setPosition(edge, v) |
| 429 | } else { |
| 430 | node.setPosition(edge, Number.NaN) |
| 431 | } |
| 432 | } |
| 433 | |
| 434 | const applyOverflowStyles = (node: LayoutNode, style: Styles): void => { |
| 435 | // Yoga's Overflow controls whether children expand the container. |
no test coverage detected