Skip to content

docs: use stroke-current for alert icon #4502

@c-shubh

Description

@c-shubh

On which page do you see this issue?

https://daisyui.com/components/alert/

Describe the issue

stroke-* color utility classes are not in the CDN file.
Only bg-*, text-*, border-* color utility classes are included in the CDN file (to save file size)

Replace stroke-info with stroke-current text-info and it will work. I will update the docs example soon

Originally posted by @saadeghi in #3509

Image

Opening this issue because the examples is docs are not yet updated. It's a simple fix: use stroke-current instead of stroke-info.

diff --git a/packages/docs/src/routes/(routes)/components/alert/+page.md b/packages/docs/src/routes/(routes)/components/alert/+page.md
index 4ebff62..bb98e14 100644
--- a/packages/docs/src/routes/(routes)/components/alert/+page.md
+++ b/packages/docs/src/routes/(routes)/components/alert/+page.md
@@ -207,7 +207,7 @@ classnames:
 
 ### ~Alert with buttons + responsive
 <div role="alert" class="alert w-full alert-vertical sm:alert-horizontal">
-  <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" class="stroke-info shrink-0 w-6 h-6"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"></path></svg>
+  <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" class="stroke-current shrink-0 w-6 h-6"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"></path></svg>
   <span>we use cookies for no reason.</span>
   <div>
     <button class="btn btn-sm">Deny</button>
@@ -217,7 +217,7 @@ classnames:
 
 ```html
 <div role="alert" class="$$alert $$alert-vertical sm:$$alert-horizontal">
-  <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" class="stroke-info h-6 w-6 shrink-0">
+  <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" class="stroke-current h-6 w-6 shrink-0">
     <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"></path>
   </svg>
   <span>we use cookies for no reason.</span>
@@ -231,7 +231,7 @@ classnames:
 
 ### ~Alert with title and description
 <div role="alert" class="alert w-full alert-vertical sm:alert-horizontal">
-  <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" class="stroke-info shrink-0 w-6 h-6"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"></path></svg>
+  <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" class="stroke-current shrink-0 w-6 h-6"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"></path></svg>
   <div>
     <h3 class="font-bold">New message!</h3>
     <div class="text-xs">You have 1 unread message</div>
@@ -241,7 +241,7 @@ classnames:
 
 ```html
 <div role="alert" class="$$alert $$alert-vertical sm:$$alert-horizontal">
-  <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" class="stroke-info h-6 w-6 shrink-0">
+  <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" class="stroke-current h-6 w-6 shrink-0">
     <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"></path>
   </svg>
   <div>
-- 

What browsers are you seeing the problem on?

All browsers

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions