// // Created by lukas on 5/11/25. // #ifndef HTMXTABLE_H #define HTMXTABLE_H #include "HtmxObject.h" #include "HtmxTableRow.h" #include "format" class HtmxTable : public HtmxObject { public: template requires std::convertible_to, std::string_view> HtmxTable(const R& strings) { // define the table header html = ""; for (const auto& s : strings) { html += format("", s); } html += ""; } /** * Add a htmx row to the table * * @param row * @return htmx representation of the row */ void add_row(const HtmxTableRow& row); /** * Complete the table */ void complete(); }; #endif //HTMXTABLE_H
{}