#include "screens/post/ActionIconButton.hpp" #include "screens/post/Accessible.hpp" #include "spec/PostsSpec.hpp" #include "ui/Palette.hpp" namespace dp { using namespace ui; ViewPtr ActionIconButton(const std::string& symbol, const std::string& label, std::function action, std::optional color) { ViewPtr icon = Icon(symbol, spec::PostsLayout::kActionIconSize)->foreground(color.value_or(Palette::fg1())); return Accessible(Button(icon, std::move(action), ButtonStyles::plain())->id(label), label); } } // namespace dp