Pad a part with top and bottom padding filled with spaces.
At the keys top and bottom you will find versions that pad only a single side of the given part.
top
bottom
See hPadPart for the horizontal version.
import {Draw} from 'effect-tree'const {drawPart, vPadPart, text} = Drawconst part = text('foo')const padded = vPadPart(1)(part)expect(drawPart(padded)).toEqual([ ' ', 'foo', ' ',]) Copy
import {Draw} from 'effect-tree'const {drawPart, vPadPart, text} = Drawconst part = text('foo')const padded = vPadPart(1)(part)expect(drawPart(padded)).toEqual([ ' ', 'foo', ' ',])
Pad a part with top and bottom padding filled with spaces.
At the keys
topandbottomyou will find versions that pad only a single side of the given part.See hPadPart for the horizontal version.