Skip to content

added class and classAlt options#264

Open
cristianvogel wants to merge 3 commits intouwdata:mainfrom
cristianvogel:master
Open

added class and classAlt options#264
cristianvogel wants to merge 3 commits intouwdata:mainfrom
cristianvogel:master

Conversation

@cristianvogel
Copy link

@cristianvogel cristianvogel commented Feb 8, 2022

Additional properties for adding class name attribute to the HTML tag names generated by .to-html formatter Optionally, a classAlt key can be used for tying a different class to every other tag rendered. Perhaps this method could replace the inline style properties.

Example with different Bulma class name alternating per row:

        table(data)
            .toHTML({
                class: { tr: "has-background-white-bis", td: "p-1"},
                classAlt: {tr:"has-background-light" },
                limit: 10
            })

I haven't tested the function passing, although I used the same logic as the style tag , so should work the same way.

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

Successfully merging this pull request may close these issues.

1 participant