|
|
|
@ -2,35 +2,11 @@ import React from "react"; |
|
|
|
|
|
|
|
|
|
import blackCancleIcon from "./black-cancle-icon.svg"; |
|
|
|
|
|
|
|
|
|
const NewTagDesign = ({ |
|
|
|
|
titleColor, |
|
|
|
|
title, |
|
|
|
|
tagBgColor, |
|
|
|
|
tagBorderColor, |
|
|
|
|
icon, |
|
|
|
|
fontSize, |
|
|
|
|
fontWeight, |
|
|
|
|
border, |
|
|
|
|
borderRadius, |
|
|
|
|
iconWidth, |
|
|
|
|
marginRight, |
|
|
|
|
marginLeft, |
|
|
|
|
align, |
|
|
|
|
paddingY, |
|
|
|
|
paddingX, |
|
|
|
|
}) => { |
|
|
|
|
const NewTagDesign = ({ title, icon, tagClassName, iconClassName }) => { |
|
|
|
|
return ( |
|
|
|
|
<button |
|
|
|
|
className={`flex ${align} ${fontWeight} items-center ${borderRadius} ${paddingY} ${paddingX} ${border} ${fontSize} ${titleColor} ${tagBorderColor} ${tagBgColor} `} |
|
|
|
|
> |
|
|
|
|
<button className={`flex items-center ${tagClassName}`}> |
|
|
|
|
{title} |
|
|
|
|
{icon && ( |
|
|
|
|
<img |
|
|
|
|
src={icon} |
|
|
|
|
alt="" |
|
|
|
|
className={`${marginRight} ${marginLeft} ${iconWidth}`} |
|
|
|
|
/> |
|
|
|
|
)} |
|
|
|
|
{icon && <img src={icon} alt="" className={` ${iconClassName}`} />} |
|
|
|
|
</button> |
|
|
|
|
); |
|
|
|
|
}; |
|
|
|
@ -39,19 +15,10 @@ export default NewTagDesign; |
|
|
|
|
|
|
|
|
|
NewTagDesign.defaultProps = { |
|
|
|
|
title: "کتاب", |
|
|
|
|
align: "flex-row", |
|
|
|
|
titleColor: "text-blue-600", |
|
|
|
|
tagBgColor: "bg-blue-300", |
|
|
|
|
border: "border-2", |
|
|
|
|
borderRadius: "rounded-full", |
|
|
|
|
tagBorderColor: "border-blue-600", |
|
|
|
|
fontSize: "text-xs", |
|
|
|
|
fontWeight: "font-bold", |
|
|
|
|
iconWidth: "w-2.5", |
|
|
|
|
marginRight: "mr-5", |
|
|
|
|
paddingY: "p-2", |
|
|
|
|
paddingX: "p-1", |
|
|
|
|
marginLeft: "ml-4", |
|
|
|
|
// for icons
|
|
|
|
|
|
|
|
|
|
tagClassName: |
|
|
|
|
"flex flex-row items-center text-blue-600 text-xs font-sansbold p-1 p-2 bg-blue-300 border-2 border-blue-600 rounded-full", |
|
|
|
|
iconClassName: "w-2.5 mr-5 ml-4", |
|
|
|
|
|
|
|
|
|
icon: blackCancleIcon, |
|
|
|
|
}; |
|
|
|
|