arquero icon indicating copy to clipboard operation
arquero copied to clipboard

added class and classAlt options

Open cristianvogel opened this issue 3 years ago • 0 comments

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.

cristianvogel avatar Feb 08 '22 19:02 cristianvogel