@@ -5,7 +5,7 @@ defmodule PetalComponents.ChatBubble do
5
5
attr :author , :string , default: nil , doc: "author name for the chat message"
6
6
attr :time , :string , default: nil , doc: "timestamp for the message"
7
7
8
- attr :message , :string , default: "That's awesome. I think our users will really appreciate the improvements." , doc: "main message content"
8
+ attr :message , :string , default: nil , doc: "main message content"
9
9
10
10
attr :avatar_src , :string , default: nil , doc: "hosted avatar URL"
11
11
attr :avatar_alt , :string , default: nil , doc: "alt text for avatar image"
@@ -101,7 +101,7 @@ defmodule PetalComponents.ChatBubble do
101
101
< img :if = { @ avatar_src } class = "w-8 h-8 rounded-full " src = { @ avatar_src } alt = { @ avatar_alt } />
102
102
< div class = "flex flex-col w-full max-w-[320px] leading-1.5 p-4 border-gray-200 bg-gray-100 rounded-e-xl rounded-es-xl dark:bg-gray-700 " >
103
103
{ render_header ( assigns ) }
104
- < p class = "text-sm font-normal py-2.5 text-gray-900 dark:text-white " > { @ message } </ p >
104
+ < p :if = { @ message } class = "text-sm font-normal py-2.5 text-gray-900 dark:text-white " > { @ message } </ p >
105
105
< span class = "text-sm font-normal text-gray-500 dark:text-gray-400 " > Delivered</ span >
106
106
</ div >
107
107
</ div >
@@ -288,7 +288,7 @@ defmodule PetalComponents.ChatBubble do
288
288
< span class = "text-sm font-semibold text-gray-900 dark:text-white " > { @ author } </ span >
289
289
< span class = "text-sm font-normal text-gray-500 dark:text-gray-400 " > { @ time } </ span >
290
290
</ div >
291
- < p class = "text-sm font-normal text-gray-900 dark:text-white " > { @ message } </ p >
291
+ < p :if = { @ message } class = "text-sm font-normal text-gray-900 dark:text-white " > { @ message } </ p >
292
292
293
293
< div x-data = "{ showTooltip: false } " class = "group relative my-2.5 " >
294
294
< div class = "absolute w-full h-full bg-gray-900/50 opacity-0 group-hover:opacity-100 transition-opacity duration-300 rounded-lg flex items-center justify-center " >
@@ -356,7 +356,7 @@ defmodule PetalComponents.ChatBubble do
356
356
< span class = "text-sm font-semibold text-gray-900 dark:text-white " > { @ author } </ span >
357
357
< span class = "text-sm font-normal text-gray-500 dark:text-gray-400 " > { @ time } </ span >
358
358
</ div >
359
- < p class = "text-sm font-normal text-gray-900 dark:text-white " > { @ message } </ p >
359
+ < p :if = { @ message } class = "text-sm font-normal text-gray-900 dark:text-white " > { @ message } </ p >
360
360
361
361
<%!-- Image Grid with Tooltips --%>
362
362
< div class = "grid gap-4 grid-cols-2 my-2.5 " >
@@ -474,7 +474,7 @@ defmodule PetalComponents.ChatBubble do
474
474
< img :if = { @ avatar_src } class = "w-8 h-8 rounded-full " src = { @ avatar_src } alt = { @ avatar_alt } />
475
475
< div class = "flex flex-col w-full max-w-[320px] leading-1.5 p-4 border-gray-200 bg-gray-100 rounded-e-xl rounded-es-xl dark:bg-gray-700 " >
476
476
{ render_header ( assigns ) }
477
- < p class = "text-sm font-normal py-2.5 text-gray-900 dark:text-white " > { @ message } </ p >
477
+ < p :if = { @ message } class = "text-sm font-normal py-2.5 text-gray-900 dark:text-white " > { @ message } </ p >
478
478
< p class = "text-sm font-normal pb-2.5 text-gray-900 dark:text-white " >
479
479
< a
480
480
href = { @ url }
@@ -535,7 +535,7 @@ defmodule PetalComponents.ChatBubble do
535
535
< div class = "flex flex-col gap-1 " >
536
536
{ render_header ( assigns ) }
537
537
< div class = "flex flex-col w-full max-w-[326px] leading-1.5 p-4 border-gray-200 bg-gray-100 rounded-e-xl rounded-es-xl dark:bg-gray-700 " >
538
- < p class = "text-sm font-normal py-2.5 text-gray-900 dark:text-white " > { @ message } </ p >
538
+ < p :if = { @ message } class = "text-sm font-normal py-2.5 text-gray-900 dark:text-white " > { @ message } </ p >
539
539
</ div >
540
540
< span class = "text-sm font-normal text-gray-500 dark:text-gray-400 " > Delivered</ span >
541
541
</ div >
@@ -714,7 +714,7 @@ defmodule PetalComponents.ChatBubble do
714
714
< img :if = { @ avatar_src } class = "w-8 h-8 rounded-full " src = { @ avatar_src } alt = { @ avatar_alt } />
715
715
< div class = "flex flex-col gap-1 w-full max-w-[326px] " >
716
716
{ render_header ( assigns ) }
717
- < p class = "text-sm font-normal text-gray-900 dark:text-white " > { @ message } </ p >
717
+ < p :if = { @ message } class = "text-sm font-normal text-gray-900 dark:text-white " > { @ message } </ p >
718
718
< div class = "flex flex-col w-full leading-1.5 p-2 border-gray-200 bg-gray-100 rounded-e-xl rounded-es-xl dark:bg-gray-700 " >
719
719
< div
720
720
x-data = "{ showTooltip: false } "
@@ -780,7 +780,7 @@ defmodule PetalComponents.ChatBubble do
780
780
< img :if = { @ avatar_src } class = "w-8 h-8 rounded-full " src = { @ avatar_src } alt = { @ avatar_alt } />
781
781
< div class = "flex flex-col gap-1 " >
782
782
{ render_header ( assigns ) }
783
- < p class = "text-sm font-normal text-gray-900 dark:text-white max-w-[326px] " > { @ message } </ p >
783
+ < p :if = { @ message } class = "text-sm font-normal text-gray-900 dark:text-white max-w-[326px] " > { @ message } </ p >
784
784
< div class = "flex flex-col w-full max-w-[326px] leading-1.5 p-2 border-gray-200 bg-gray-100 rounded-e-xl rounded-es-xl dark:bg-gray-700 " >
785
785
<%!-- Image Grid --%>
786
786
< div class = "grid gap-4 grid-cols-2 my-2.5 " >
@@ -895,7 +895,7 @@ defmodule PetalComponents.ChatBubble do
895
895
< img :if = { @ avatar_src } class = "w-8 h-8 rounded-full " src = { @ avatar_src } alt = { @ avatar_alt } />
896
896
< div class = "flex flex-col gap-1 w-full max-w-[320px] " >
897
897
{ render_header ( assigns ) }
898
- < p class = "text-sm font-normal py-2.5 text-gray-900 dark:text-white " > { @ message } </ p >
898
+ < p :if = { @ message } class = "text-sm font-normal py-2.5 text-gray-900 dark:text-white " > { @ message } </ p >
899
899
< div class = "flex flex-col w-full leading-1.5 p-4 border-gray-200 bg-gray-100 rounded-e-xl rounded-es-xl dark:bg-gray-700 " >
900
900
< p class = "text-sm font-normal pb-2.5 text-gray-900 dark:text-white " >
901
901
< a
@@ -957,7 +957,7 @@ defmodule PetalComponents.ChatBubble do
957
957
< img :if = { @ avatar_src } class = "w-8 h-8 rounded-full " src = { @ avatar_src } alt = { @ avatar_alt } />
958
958
< div class = "flex flex-col w-full max-w-[320px] leading-1.5 " >
959
959
{ render_header ( assigns ) }
960
- < p class = "text-sm font-normal py-2.5 text-gray-900 dark:text-white " > { @ message } </ p >
960
+ < p :if = { @ message } class = "text-sm font-normal py-2.5 text-gray-900 dark:text-white " > { @ message } </ p >
961
961
< span class = "text-sm font-normal text-gray-500 dark:text-gray-400 " > Delivered</ span >
962
962
</ div >
963
963
</ div >
@@ -1128,7 +1128,7 @@ defmodule PetalComponents.ChatBubble do
1128
1128
< div class = "flex flex-col w-full max-w-[326px] leading-1.5 " >
1129
1129
{ render_header ( assigns ) }
1130
1130
< div class = "flex flex-col w-full max-w-[326px] leading-1.5 p-4 " >
1131
- < p class = "text-sm font-normal text-gray-900 dark:text-white " > { @ message } </ p >
1131
+ < p :if = { @ message } class = "text-sm font-normal text-gray-900 dark:text-white " > { @ message } </ p >
1132
1132
</ div >
1133
1133
< div class = "my-2.5 " >
1134
1134
< div x-data = "{ showTooltip: false } " class = "group relative " >
@@ -1193,7 +1193,7 @@ defmodule PetalComponents.ChatBubble do
1193
1193
< img class = "w-8 h-8 rounded-full " src = { @ avatar_src } alt = { @ avatar_alt } />
1194
1194
< div class = "flex flex-col gap-1 " >
1195
1195
{ render_header ( assigns ) }
1196
- < p class = "text-sm font-normal text-gray-900 dark:text-white max-w-[326px] " > { @ message } </ p >
1196
+ < p :if = { @ message } class = "text-sm font-normal text-gray-900 dark:text-white max-w-[326px] " > { @ message } </ p >
1197
1197
< div class = "flex flex-col w-full max-w-[326px] leading-1.5 p-2 " >
1198
1198
<%!-- Image Grid with Tooltips --%>
1199
1199
< div class = "grid gap-4 grid-cols-2 my-2.5 " >
@@ -1310,7 +1310,7 @@ defmodule PetalComponents.ChatBubble do
1310
1310
< img class = "w-8 h-8 rounded-full " src = { @ avatar_src } alt = { @ avatar_alt } />
1311
1311
< div class = "flex flex-col w-full max-w-[320px] leading-1.5 " >
1312
1312
{ render_header ( assigns ) }
1313
- < p class = "text-sm font-normal py-2.5 text-gray-900 dark:text-white " > { @ message } </ p >
1313
+ < p :if = { @ message } class = "text-sm font-normal py-2.5 text-gray-900 dark:text-white " > { @ message } </ p >
1314
1314
< p class = "text-sm font-normal pb-2.5 text-gray-900 dark:text-white " >
1315
1315
< a
1316
1316
href = { @ url }
0 commit comments