Pad a part with left and right padding filled with the optional padding, by default the space character.
At the keys left and right you will find versions that pad only a single side of the given part.
left
right
See vPadPart for the vertical version.
import {Draw} from 'effect-tree'const {drawPart, hPadPart, text} = Drawconst part = text('foo')const padded = hPadPart('←', '→')(1, 2)(part)expect(drawPart(padded)).toEqual(['←foo→→']) Copy
import {Draw} from 'effect-tree'const {drawPart, hPadPart, text} = Drawconst part = text('foo')const padded = hPadPart('←', '→')(1, 2)(part)expect(drawPart(padded)).toEqual(['←foo→→'])
Pad a part with left and right padding filled with the optional padding, by default the space character.
At the keys
leftandrightyou will find versions that pad only a single side of the given part.See vPadPart for the vertical version.