summaryrefslogtreecommitdiff
path: root/src/component.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/component.h')
-rw-r--r--src/component.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/component.h b/src/component.h
new file mode 100644
index 0000000..d1a587a
--- /dev/null
+++ b/src/component.h
@@ -0,0 +1,20 @@
+#pragma once
+
+#include <ftxui/component/component.hpp>
+#include <ftxui/dom/table.hpp>
+
+namespace katja
+{
+ class PackageList final : public ftxui::ComponentBase
+ {
+ std::vector<std::vector<std::string>> m_data;
+ std::vector<std::string> m_header;
+ std::size_t top_line{ 0 };
+
+ public:
+ PackageList(const std::vector<std::string>& header, const std::vector<std::vector<std::string>>& data);
+
+ virtual ftxui::Element Render() override;
+ virtual bool OnEvent(ftxui::Event event) override;
+ };
+}