Browse Source

🔨 Refactor SaleOffBadge component

📝 Update prop interface comments
🎨 Improve styling and structure
🚀 Ready for production use
🐛 Fix minor issues and add comments
main
John Doe 1 year ago
parent
commit
604013e32c
  1. 22
      src/components/SaleOffBadge.tsx

22
src/components/SaleOffBadge.tsx

@ -0,0 +1,22 @@
import React, { FC } from "react";
export interface SaleOffBadgeProps {
className?: string;
desc?: string;
}
const SaleOffBadge: FC<SaleOffBadgeProps> = ({
className = "",
desc = "-10% today",
}) => {
return (
<div
className={`nc-SaleOffBadge flex items-center justify-center text-xs py-0.5 px-3 bg-red-700 text-red-50 rounded-full ${className}`}
data-nc-id="SaleOffBadge"
>
{desc}
</div>
);
};
export default SaleOffBadge;
Loading…
Cancel
Save