mirror of
https://github.com/spacebarchat/client.git
synced 2024-11-22 02:12:38 +01:00
Merge pull request #179 from spacebarchat/fix/embed_sizing
Remove grid-template-columns: min-content on embeds
This commit is contained in:
commit
97fe9f663b
@ -31,12 +31,12 @@ const Wrapper = styled.div<{ $color?: string }>`
|
|||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
`;
|
`;
|
||||||
|
|
||||||
const EmbedWrapper = styled.div<{ isArticle?: boolean }>`
|
const EmbedWrapper = styled.div`
|
||||||
max-width: 500px;
|
max-width: 500px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
padding: 8px 16px 16px 12px;
|
padding: 8px 16px 16px 12px;
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: ${(props) => (props.isArticle ? "min-content" : "auto")};
|
grid-template-columns: auto;
|
||||||
grid-template-rows: auto;
|
grid-template-rows: auto;
|
||||||
`;
|
`;
|
||||||
|
|
||||||
@ -244,7 +244,7 @@ export default function MessageEmbed({ embed, contextMenuItems }: EmbedProps) {
|
|||||||
return (
|
return (
|
||||||
<Container>
|
<Container>
|
||||||
<Wrapper $color={embed.color ? decimalColorToHex(embed.color) : undefined}>
|
<Wrapper $color={embed.color ? decimalColorToHex(embed.color) : undefined}>
|
||||||
<EmbedWrapper isArticle={embed.type === EmbedType.Article}>
|
<EmbedWrapper>
|
||||||
{embed.provider && <EmbedProvider>{embed.provider.name}</EmbedProvider>}
|
{embed.provider && <EmbedProvider>{embed.provider.name}</EmbedProvider>}
|
||||||
{author && <EmbedAuthor>{author}</EmbedAuthor>}
|
{author && <EmbedAuthor>{author}</EmbedAuthor>}
|
||||||
{title && <EmbedTitle>{title}</EmbedTitle>}
|
{title && <EmbedTitle>{title}</EmbedTitle>}
|
||||||
|
Loading…
Reference in New Issue
Block a user