MCPcopy Index your code
hub / github.com/codeaashu/claude-code / applyPaddingStyles

Function applyPaddingStyles

src/ink/styles.ts:484–512  ·  view source on GitHub ↗
(node: LayoutNode, style: Styles)

Source from the content-addressed store, hash-verified

482}
483
484const applyPaddingStyles = (node: LayoutNode, style: Styles): void => {
485 if ('padding' in style) {
486 node.setPadding(LayoutEdge.All, style.padding ?? 0)
487 }
488
489 if ('paddingX' in style) {
490 node.setPadding(LayoutEdge.Horizontal, style.paddingX ?? 0)
491 }
492
493 if ('paddingY' in style) {
494 node.setPadding(LayoutEdge.Vertical, style.paddingY ?? 0)
495 }
496
497 if ('paddingLeft' in style) {
498 node.setPadding(LayoutEdge.Left, style.paddingLeft || 0)
499 }
500
501 if ('paddingRight' in style) {
502 node.setPadding(LayoutEdge.Right, style.paddingRight || 0)
503 }
504
505 if ('paddingTop' in style) {
506 node.setPadding(LayoutEdge.Top, style.paddingTop || 0)
507 }
508
509 if ('paddingBottom' in style) {
510 node.setPadding(LayoutEdge.Bottom, style.paddingBottom || 0)
511 }
512}
513
514const applyFlexStyles = (node: LayoutNode, style: Styles): void => {
515 if ('flexGrow' in style) {

Callers 1

stylesFunction · 0.85

Calls 1

setPaddingMethod · 0.45

Tested by

no test coverage detected