feat(ui): fix alignment

This commit is contained in:
Barrett Ruth 2025-10-23 23:14:53 -04:00
parent 92ffa41ed0
commit 038fcd36f8
3 changed files with 42 additions and 25 deletions

View file

@ -18,6 +18,14 @@ function M.pad_right(text, width)
return text .. string.rep(' ', pad)
end
function M.pad_left(text, width)
local pad = width - #text
if pad <= 0 then
return text
end
return string.rep(' ', pad) .. text
end
function M.center(text, width)
local pad = width - #text
if pad <= 0 then