some unnecessary code removed from text-customizations

This commit is contained in:
Saimon8420 2024-12-31 16:31:15 +06:00
parent 3cfb7d0792
commit 714c732f7a

View file

@ -62,9 +62,9 @@ const TextCustomization = () => {
}
}
const updatePreview = (properties) => {
setPreviewText(text);
}
// const updatePreview = (properties) => {
// setPreviewText(text);
// }
const applyChanges = () => {
updateActiveObject({
@ -83,57 +83,47 @@ const TextCustomization = () => {
const handleTextChange = (newText) => {
setText(newText);
updatePreview({ text: newText });
setPreviewText(newText);
}
const handleFontFamilyChange = (newFontFamily) => {
setFontFamily(newFontFamily);
updatePreview({ fontFamily: newFontFamily });
}
const handleFontSizeChange = (newFontSize) => {
setFontSize(newFontSize)
updatePreview({ fontSize: newFontSize })
}
const handleTextAlignChange = (newTextAlign) => {
setTextAlign(newTextAlign)
updatePreview({ textAlign: newTextAlign })
}
const handleFontStyleChange = () => {
const newFontStyle = fontStyle === 'normal' ? 'italic' : 'normal'
setFontStyle(newFontStyle)
updatePreview({ fontStyle: newFontStyle })
}
const handleFontWeightChange = () => {
const newFontWeight = fontWeight === 'normal' ? 'bold' : 'normal'
setFontWeight(newFontWeight)
updatePreview({ fontWeight: newFontWeight })
}
const handleLineHeightChange = (newLineHeight) => {
setLineHeight(newLineHeight)
updatePreview({ lineHeight: newLineHeight })
}
const handleCharSpacingChange = (newCharSpacing) => {
setCharSpacing(newCharSpacing)
updatePreview({ charSpacing: newCharSpacing })
}
const handleUnderlineChange = () => {
const newUnderline = !underline
setUnderline(newUnderline)
updatePreview({ underline: newUnderline })
}
const handleLinethroughChange = () => {
const newLinethrough = !linethrough
setLinethrough(newLinethrough)
updatePreview({ linethrough: newLinethrough })
}
const content = () => {