import { __ } from "@wordpress/i18n"; import { useState } from "@wordpress/element"; import { Background, Border, BoxShadow, Divider, Spacing, SpColorPicker, SPToggleGroupControl, Toggle, TypographyNew, } from "../../components"; import { BgIcon, GradientIcon } from "../../components/background/svgIcon"; export const SocialProfilesIconStyleTab = ({ attributes, setAttributes }) => { const { socialIconCustomColorEnable, socialIconColor, socialIconBg, socialIconBorder, socialIconBorderWidth, socialIconBorderRadius, socialIconBorderHover, socialIconBorderWidthHover, socialIconBorderRadiusHover, socialIconBoxShadowEnable, socialIconBoxShadowValue, socialIconBoxShadowHoverEnable, socialIconBoxShadowHoverValue, socialIconMargin, layout, socialIconDividerColor, } = attributes; const [colorState, setColorState] = useState("color"); return ( <> setColorState(newValue)} items={[ { label: "Normal", value: "color" }, { label: "Hover", value: "hover" }, ]} /> {"social-profiles-layout-three" === layout && ( <> {"color" === colorState ? ( setAttributes({ socialIconDividerColor: { ...socialIconDividerColor, color: newValue, }, }) } /> ) : ( setAttributes({ socialIconDividerColor: { ...socialIconDividerColor, hover: newValue, }, }) } /> )} )} {socialIconCustomColorEnable && ( <> {"color" === colorState ? ( <> setAttributes({ socialIconColor: { ...socialIconColor, color: newValue, }, }) } /> ) : ( <> setAttributes({ socialIconColor: { ...socialIconColor, hover: newValue, }, }) } /> )} , value: "bgColor", tooltip: "Solid", }, { label: , value: "gradient", tooltip: "Gradient", }, ]} /> )} {"color" === colorState ? ( <> {socialIconBoxShadowEnable && ( <> )} ) : ( <> {socialIconBoxShadowHoverEnable && ( <> )} )} ); }; export const SocialProfilesLabelStyleTab = ({ attributes, setAttributes }) => { const { socialLabelTypography, socialLabelFontSize, socialLabelLetterSpacing, socialLabelLineHeight, socialLabelColor, socialSubTextTypography, socialSubTextFontSize, socialSubTextLetterSpacing, socialSubTextLineHeight, socialSubTextColor, socialLabelWordSpacing, socialSubTextWordSpacing, socialLabelEnable, socialSubTextEnable, socialLabelGlobalTypography, socialSubTextGlobalTypography, } = attributes; const [colorState, setColorState] = useState("color"); return ( <> {socialLabelEnable && ( )} {socialSubTextEnable && ( )} setColorState(newValue)} items={[ { label: "Normal", value: "color" }, { label: "Hover", value: "hover" }, ]} /> {"color" === colorState ? ( <> {socialLabelEnable && ( setAttributes({ socialLabelColor: { ...socialLabelColor, color: newValue, }, }) } /> )} {socialSubTextEnable && ( setAttributes({ socialSubTextColor: { ...socialSubTextColor, color: newValue, }, }) } /> )} ) : ( <> {socialLabelEnable && ( setAttributes({ socialLabelColor: { ...socialLabelColor, hoverColor: newValue, }, }) } /> )} {socialSubTextEnable && ( setAttributes({ socialSubTextColor: { ...socialSubTextColor, hoverColor: newValue, }, }) } /> )} )} ); };