Skip to content

Commit

Permalink
Merge pull request #179 from spacebarchat/fix/embed_sizing
Browse files Browse the repository at this point in the history
Remove grid-template-columns: min-content on embeds
  • Loading branch information
Puyodead1 authored Sep 16, 2023
2 parents ce673a7 + b027b62 commit 97fe9f6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/components/messaging/MessageEmbed.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@ const Wrapper = styled.div<{ $color?: string }>`
border-radius: 4px;
`;

const EmbedWrapper = styled.div<{ isArticle?: boolean }>`
const EmbedWrapper = styled.div`
max-width: 500px;
overflow: hidden;
padding: 8px 16px 16px 12px;
display: grid;
grid-template-columns: ${(props) => (props.isArticle ? "min-content" : "auto")};
grid-template-columns: auto;
grid-template-rows: auto;
`;

Expand Down Expand Up @@ -244,7 +244,7 @@ export default function MessageEmbed({ embed, contextMenuItems }: EmbedProps) {
return (
<Container>
<Wrapper $color={embed.color ? decimalColorToHex(embed.color) : undefined}>
<EmbedWrapper isArticle={embed.type === EmbedType.Article}>
<EmbedWrapper>
{embed.provider && <EmbedProvider>{embed.provider.name}</EmbedProvider>}
{author && <EmbedAuthor>{author}</EmbedAuthor>}
{title && <EmbedTitle>{title}</EmbedTitle>}
Expand Down

0 comments on commit 97fe9f6

Please sign in to comment.