(yogaNode: LayoutNode)
| 15 | * the rendered line count stays consistent with the layout height. |
| 16 | */ |
| 17 | const getMaxWidth = (yogaNode: LayoutNode): number => { |
| 18 | return ( |
| 19 | yogaNode.getComputedWidth() - |
| 20 | yogaNode.getComputedPadding(LayoutEdge.Left) - |
| 21 | yogaNode.getComputedPadding(LayoutEdge.Right) - |
| 22 | yogaNode.getComputedBorder(LayoutEdge.Left) - |
| 23 | yogaNode.getComputedBorder(LayoutEdge.Right) |
| 24 | ) |
| 25 | } |
| 26 | |
| 27 | export default getMaxWidth |
| 28 |
no test coverage detected