setSmartListStyleType(val)}
/>
{smartListStyleType === "color" && (
<>
,
value: "bgColor",
tooltip: "Solid",
},
{
label: ,
value: "gradient",
tooltip: "Gradient",
},
]}
/>
{boxShadowEnable && (
)}
>
)}
{smartListStyleType === "hover" && (
<>
,
value: "bgColor",
tooltip: "Solid",
},
{
label: ,
value: "gradient",
tooltip: "Gradient",
},
]}
// items={ BACKGROUND_ITEMS }
/>
{boxShadowHoverEnable && (
)}
>
)}
>
);
};
export const IconImageGeneralTab = ({ attributes, setAttributes }) => {
const {
iconEnable,
iconSource,
svgIconName,
iconName,
iconSize,
iconSourceCustom,
iconCustomWidth,
iconCustomHeight,
iconPosition,
iconEnableParent,
parentListsLayout,
iconAlignment,
} = attributes;
const iconAlignmentItems =
iconPosition === "top"
? [
{ label: , value: "start" },
{ label: , value: "center" },
{ label: , value: "end" },
]
: [
{ label: , value: "start" },
{ label: , value: "center" },
{ label: , value: "end" },
];
return (
<>
{(iconEnable ?? iconEnableParent) && (
<>
{["iconSet", "library"].includes(iconSource) && (
<>
{"iconSet" === iconSource && (
<>
>
)}
{"library" === iconSource && (
)}
>
)}
{iconSource === "custom" && (
<>
>
)}
{parentListsLayout !== "layout-five" && (
)}
>
)}
>
);
};
export const IconImageStyleTab = ({ attributes, setAttributes }) => {
const {
iconEnable,
iconEnableParent,
iconBackgroundEnable,
backgroundShape,
iconColor,
iconBg,
iconBgRadialShape,
iconBgRadialPosition,
iconBorderStyle,
iconBorderStyleWidth,
iconBorderRadius,
iconBgHoverRadialShape,
iconBgHoverRadialPosition,
iconHoverBorderStyle,
iconHoverBorderStyleWidth,
iconHoverBorderRadius,
iconPadding,
} = attributes;
const [iconStyleState, setIconStyleState] = useState("color");
return (
<>
{(iconEnable ?? iconEnableParent) && (
<>
{iconBackgroundEnable && (
<>
{__("Choose Background Shape", "post-carousel")}
,
value: "backgroundShapeSquare",
},
{
label: ,
value: "backgroundShapeCircle",
},
{
label: ,
value: "backgroundShapeHexagon",
},
{
label: ,
value: "backgroundShapeDiamond",
},
{
label: ,
value: "backgroundShapeStarburst",
},
]}
onClick={(val) => setAttributes({ backgroundShape: val })}
/>
>
)}
setIconStyleState(val)}
/>
{iconStyleState === "color" && (
<>
setAttributes({
iconColor: {
...iconColor,
color: newColor,
},
})
}
defaultColor="#757575"
/>
{iconBackgroundEnable && (
<>
{iconBg[iconStyleState]?.style === "gradient" && (
<>
{/^radial-gradient/.test(iconBg[iconStyleState]?.gradient) && (
<>
>
)}
>
)}
>
)}
{backgroundShape === "backgroundShapeSquare" && (
)}
>
)}
{iconStyleState === "hover" && (
<>
setAttributes({
iconColor: {
...iconColor,
hoverColor: newColor,
},
})
}
defaultColor="#757575"
/>
{iconBackgroundEnable && (
<>
{iconBg[iconStyleState]?.style === "gradient" && (
<>
{/^radial-gradient/.test(iconBg[iconStyleState]?.gradient) && (
<>
>
)}
>
)}
>
)}
{backgroundShape === "backgroundShapeSquare" && (
)}
>
)}
>
)}
>
);
};
export const ContentGeneralTab = ({ attributes, setAttributes }) => {
const { listTitleEnable, descriptionEnable, titleDescriptionGap } = attributes;
return (
<>
{listTitleEnable && descriptionEnable && (
)}
>
);
};
export const ContentStyleTab = ({ attributes, setAttributes }) => {
const {
titleTypography,
titleFontSize,
titleLatterSpacing,
titleLineHeight,
titleWordSpacing,
descriptionTypography,
descriptionFontSize,
descriptionLatterSpacing,
descriptionLineHeight,
descriptionWordSpacing,
titleColor,
descriptionColor,
descriptionEnable,
} = attributes;
const [contentStyleType, setContentStyleType] = useState("color");
return (
<>
{descriptionEnable && (
)}
setContentStyleType(val)}
/>
{contentStyleType === "color" && (
<>
setAttributes({
titleColor: {
...titleColor,
color: newColor,
},
})
}
defaultColor="#2F2F2F"
/>
{descriptionEnable && (
setAttributes({
descriptionColor: {
...descriptionColor,
color: newColor,
},
})
}
defaultColor="#757575"
/>
)}
>
)}
{contentStyleType === "hover" && (
<>
setAttributes({
titleColor: {
...titleColor,
hoverColor: newColor,
},
})
}
defaultColor="#2F2F2F"
/>
{descriptionEnable && (
setAttributes({
descriptionColor: {
...descriptionColor,
hoverColor: newColor,
},
})
}
defaultColor="#757575"
/>
)}
>
)}
>
);
};
export const BadgeGeneralTab = ({ attributes, setAttributes }) => {
const { badgeEnable, badgeLabel } = attributes;
return (
<>
{badgeEnable && (
)}
>
);
};
export const BadgeStyleTab = ({ attributes, setAttributes }) => {
const {
badgeTypography,
badgeFontSize,
badgeLatterSpacing,
badgeLineHeight,
badgeWordSpacing,
badgeColor,
badgeBgColor,
badgeBorderStyle,
badgeBorderStyleWidth,
badgeBorderRadius,
badgePadding,
badgeMargin,
badgeEnable,
} = attributes;
return (
<>
{badgeEnable && (
<>
setAttributes({ badgeColor: newColor })}
defaultColor="#0255A7"
/>
setAttributes({ badgeBgColor: newColor })}
defaultColor="#DFECFF"
/>
>
)}
>
);
};