Skip to content

Commit

Permalink
add rendering for embed color
Browse files Browse the repository at this point in the history
  • Loading branch information
jay3332 committed Dec 14, 2023
1 parent 452f30c commit 33038b9
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/components/messaging/Chat.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -145,10 +145,13 @@ export function MessageContent(props: { message: Message, largePadding?: boolean
<For each={message().embeds}>
{(embed) => (
<div class="rounded overflow-hidden inline-flex my-1">
<div class="inline-flex flex-col p-2.5 border-l-accent border-l-4" style={{
<div class="inline-flex flex-col p-2.5 border-l-4" style={{
'background-color': embed.hue != null
? `color-mix(in srgb, rgb(var(--c-bg-0)), hsl(${embed.hue * 3.6}, 35%, 50%) 25%)`
: 'rgb(var(--c-bg-0))'
: 'rgb(var(--c-bg-0))',
'border-left-color': embed.color != null
? '#' + embed.color!.toString(16)
: 'rgb(var(--c-accent))',
}}>
<Show when={embed.author}>
<a
Expand Down

0 comments on commit 33038b9

Please sign in to comment.