#include "screens/reactions/ReactionChip.hpp" #include "spec/PostsSpec.hpp" #include "ui/Palette.hpp" namespace dp { using namespace ui; using spec::PostsLayout; ViewPtr ReactionChip(ViewPtr content, bool isMine) { const Color fill = isMine ? Palette::accent().opacity(PostsLayout::kChipMineFillOpacity) : Palette::bg2(); const Color stroke = isMine ? Palette::accent() : Palette::fg2(); return content->paddingH(PostsLayout::kChipHPad)->paddingV(PostsLayout::kChipVPad) ->background(fill, Corners::all(100)) ->border(stroke, 100, isMine ? PostsLayout::kChipMineBorder : PostsLayout::kChipBorder, isMine ? 1.0f : PostsLayout::kChipBorderOpacity); } } // namespace dp