Repos
C++
655 B19 lines Opens in site
Directory
Raw
Download
#include "screens/reactions/ReactionView.hpp"
#include "screens/reactions/ReactionChip.hpp"
#include "spec/PostsSpec.hpp"
#include "ui/Palette.hpp"
namespace dp {
using namespace ui;
using spec::PostsLayout;
ViewPtr ReactionView(const std::string& emoji, std::int64_t count, bool isMine) {
ViewPtr content = HStack({Text(emoji)->font(FontSpec::system(PostsLayout::kChipFont)),
Text(std::to_string(count))->font(FontSpec::system(PostsLayout::kChipFont, Weight::Medium))->foreground(Palette::fg1())},
PostsLayout::kChipInnerSpacing);
return ReactionChip(content, isMine);
}
} // namespace dp