+
>[];
if (props.data.attributes === undefined) {
return style;
}
- const ruleBold: StyleValue = "fontFamily: var(--font-title)";
- const headerFontSizes = ["2rem", "1.75rem", "1.5rem", "1.25rem", "1rem", "0.75rem"];
if (props.data.attributes.align) {
const ruleAlign: StyleValue = `textAlign: ${props.data.attributes.align}`;
style.push(ruleAlign);
}
- if (props.data.attributes.header) {
- const ruleHeader: StyleValue = `fontSize: ${headerFontSizes[props.data.attributes.header - 1]}`;
- style.push(ruleHeader);
- style.push(ruleBold);
- }
return style;
}
@@ -54,4 +64,37 @@ function getLineStyle(): StyleValue {
.tp-texts {
white-space: pre-wrap;
}
+
+.tp-texts-header1,
+.tp-texts-header2,
+.tp-texts-header3,
+.tp-texts-header4,
+.tp-texts-header5,
+.tp-texts-header6 {
+ font-family: var(--font-title);
+}
+
+.tp-texts-header1 {
+ font-size: 24px;
+}
+
+.tp-texts-header2 {
+ font-size: 20px;
+}
+
+.tp-texts-header3 {
+ font-size: 18px;
+}
+
+.tp-texts-header4 {
+ font-size: 16px;
+}
+
+.tp-texts-header5 {
+ font-size: 14px;
+}
+
+.tp-texts-header6 {
+ font-size: 12px;
+}