From 65c9735d105f07f84e8ffc1a1b1dfd7045f9854e Mon Sep 17 00:00:00 2001 From: Dan Abramov Date: Mon, 21 Oct 2024 20:03:19 +0100 Subject: [PATCH] Align remove buttons Remove the implicit top padding in record embeds and make it conditional, which is similar to how we treat external link embeds. This makes the X button appear in the same place for record embeds as with links. --- .../StarterPack/StarterPackCard.tsx | 1 - src/view/com/composer/ExternalEmbed.tsx | 1 - src/view/com/util/post-embeds/index.tsx | 20 ++++++++++++++----- 3 files changed, 15 insertions(+), 7 deletions(-) diff --git a/src/components/StarterPack/StarterPackCard.tsx b/src/components/StarterPack/StarterPackCard.tsx index 6af1e1358b..ce458bc84e 100644 --- a/src/components/StarterPack/StarterPackCard.tsx +++ b/src/components/StarterPack/StarterPackCard.tsx @@ -141,7 +141,6 @@ export function Embed({ return ( + return ( + + + + ) } // list embed if (AppBskyGraphDefs.isListView(embed.record)) { - return + return ( + + + + ) } // starter pack embed if (AppBskyGraphDefs.isStarterPackViewBasic(embed.record)) { - return + return ( + + + + ) } // quote post @@ -238,7 +250,6 @@ export function MaybeListCard({view}: {view: AppBskyGraphDefs.ListView}) { t.atoms.border_contrast_medium, a.p_md, a.rounded_sm, - a.mt_sm, ]}> @@ -264,7 +275,6 @@ const styles = StyleSheet.create({ customFeedOuter: { borderWidth: StyleSheet.hairlineWidth, borderRadius: 8, - marginTop: 4, paddingHorizontal: 12, paddingVertical: 12, },