UNPKG

ink-divider

Version:
2 lines 698 B
import{Text as n,Box as t}from"ink";import{jsx as o,jsxs as g}from"react/jsx-runtime";var b=({width:e="auto",dividerChar:i,dividerColor:r="gray",boxProps:d})=>o(t,{width:e,borderStyle:{bottom:i},borderColor:r,flexGrow:1,borderBottom:!0,borderTop:!1,borderLeft:!1,borderRight:!1,...d}),f=({title:e,width:i="auto",padding:r=0,titlePadding:d=1,titleColor:s="white",dividerChar:a="\u2500",dividerColor:l="gray",boxProps:x})=>{let p=o(b,{dividerChar:a,dividerColor:l,boxProps:x});return e?g(t,{width:i,paddingLeft:r,paddingRight:r,gap:d,children:[p,o(t,{children:o(n,{color:s,children:e})}),p]}):o(t,{paddingLeft:r,paddingRight:r,children:p})},v=f;export{v as default}; //# sourceMappingURL=index.js.map