some unnecessary code removed from text-customizations
This commit is contained in:
parent
3cfb7d0792
commit
714c732f7a
1 changed files with 3 additions and 13 deletions
|
|
@ -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 = () => {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue