import { useState } from "@wordpress/element";
import { Spacing, SpColorPicker, SPRangeControl, SPToggleGroupControl, Toggle, TypographyNew } from "../../components";
import { __ } from "@wordpress/i18n";
export const ExcerptTab = ({ attributes, setAttributes }) => {
const [colorState, setColorState] = useState("normal");
const {
blockName,
excerptMargin,
excerptShow,
excerptLineHeight,
excerptLatterSpacing,
excerptFontSize,
excerptTypography,
excerptColor,
excerptLength,
excerptWordSpacing,
excerptGlobalTypography,
} = attributes;
return (
<>
{excerptShow && (
<>
setColorState(newColor)}
/>
{"normal" === colorState ? (
setAttributes({
excerptColor: {
...excerptColor,
color: newColor,
},
})
}
defaultColor="#FFFFFF"
/>
) : (
setAttributes({
excerptColor: {
...excerptColor,
hoverColor: newColor,
},
})
}
/>
)}
>
)}
>
);
};