Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support for passing style option to print.table #724

Open
Faizahmadfaiz opened this issue Aug 24, 2020 · 1 comment
Open

support for passing style option to print.table #724

Faizahmadfaiz opened this issue Aug 24, 2020 · 1 comment

Comments

@Faizahmadfaiz
Copy link

Hey guys, I want to print a table in which I want some of my column cells to be right aligned. Going through cli-table3 (which is used by gluegun) examples, I found this

var table = new Table({
  chars: { 'top': '' , 'top-mid': '' , 'top-left': '' , 'top-right': ''
         , 'bottom': '' , 'bottom-mid': '' , 'bottom-left': '' , 'bottom-right': ''
         , 'left': '' , 'left-mid': '' , 'mid': '' , 'mid-mid': ''
         , 'right': '' , 'right-mid': '' , 'middle': ' ' },
  style: { 'padding-left': 0, 'padding-right': 0 }
});

Currently in table function I can see we can pass only data: string[][], options: GluegunPrintTableOptions = {} .It seems to me currently I can't achive my goal of making cells right aligned.

@jamonholmgren
Copy link
Member

@Faizahmadfaiz I'd accept a PR that adds it to GluegunPrintTableOptions!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants