I found the @apply directive an easy way to reuse code but when I'm using the @apply directive in tailwind css it is showing me error You cannot @apply the btn utility here because it creates a circular dependency.
This is my HTML code
<a class="bg-transparent border btn border-black hover:bg-black hover:text-white px-6 py-2 rounded-2xl"
href="">Browse</a>
<a>Look</a>
I want the classes of the 1st a tag in my second tag by just using @apply directive
And this is my tailwind css file where I put the @apply directive
@tailwind base;
@tailwind components;
.btn{
@apply bg-transparent border btn border-black hover:bg-black hover:text-white px-6 py-2 rounded-2xl;
}
@tailwind utilities;