| 1 |
const useDefaultValue = (blockName) => { |
| 2 |
const defaultValue = { |
| 3 |
titleFontSize: 22, |
| 4 |
imageWidth: 100, |
| 5 |
imageSpace: 12, |
| 6 |
largeItemTitleFontSize: 26, |
| 7 |
metaColor: "#333333", |
| 8 |
badgesFontSize: 10, |
| 9 |
carouselArrowHorizontal: 30, |
| 10 |
}; |
| 11 |
|
| 12 |
const defaultData = { |
| 13 |
"post-list-two": { |
| 14 |
...defaultValue, |
| 15 |
titleFontSize: "", |
| 16 |
imageWidth: "", |
| 17 |
imageSpace: "", |
| 18 |
}, |
| 19 |
"post-list-three": { |
| 20 |
...defaultValue, |
| 21 |
largeItemTitleFontSize: "", |
| 22 |
titleFontSize: "", |
| 23 |
metaColor: "", |
| 24 |
}, |
| 25 |
"post-carousel": { |
| 26 |
...defaultValue, |
| 27 |
carouselArrowHorizontal: -22, |
| 28 |
}, |
| 29 |
"post-carousel-two": { |
| 30 |
...defaultValue, |
| 31 |
carouselArrowHorizontal: -22, |
| 32 |
}, |
| 33 |
"post-timeline-three": { |
| 34 |
...defaultValue, |
| 35 |
carouselArrowHorizontal: -10, |
| 36 |
}, |
| 37 |
"post-slider-two": { |
| 38 |
...defaultValue, |
| 39 |
carouselArrowHorizontal: "", |
| 40 |
}, |
| 41 |
"thumbnail-slider-two": { |
| 42 |
...defaultValue, |
| 43 |
carouselArrowHorizontal: "", |
| 44 |
}, |
| 45 |
default: { |
| 46 |
...defaultValue, |
| 47 |
}, |
| 48 |
}; |
| 49 |
|
| 50 |
return defaultData[blockName] ? defaultData[blockName] : defaultData["default"]; |
| 51 |
}; |
| 52 |
|
| 53 |
export default useDefaultValue; |
| 54 |
|