diff --git a/backend/src/db/api/ui_elements.js b/backend/src/db/api/ui_elements.js index d42b59e..5cc6799 100644 --- a/backend/src/db/api/ui_elements.js +++ b/backend/src/db/api/ui_elements.js @@ -97,6 +97,10 @@ class Ui_elementsDBApi extends GenericDBApi { descriptionText: '', descriptionTitleFontSize: '48px', descriptionTextFontSize: '36px', + descriptionTitleFontFamily: 'inherit', + descriptionTextFontFamily: 'inherit', + descriptionTitleColor: '#000000', + descriptionTextColor: '#4B5563', descriptionBackgroundColor: 'transparent', appearDelaySec: 0, appearDurationSec: null, diff --git a/frontend/src/pages/constructor.tsx b/frontend/src/pages/constructor.tsx index 8da3f26..112cd7f 100644 --- a/frontend/src/pages/constructor.tsx +++ b/frontend/src/pages/constructor.tsx @@ -121,6 +121,10 @@ type CanvasElement = { descriptionText?: string; descriptionTitleFontSize?: string; descriptionTextFontSize?: string; + descriptionTitleFontFamily?: string; + descriptionTextFontFamily?: string; + descriptionTitleColor?: string; + descriptionTextColor?: string; descriptionBackgroundColor?: string; navLabel?: string; navType?: NavigationButtonKind; @@ -488,6 +492,10 @@ const createDefaultElement = ( descriptionText: '', descriptionTitleFontSize: '48px', descriptionTextFontSize: '36px', + descriptionTitleFontFamily: 'inherit', + descriptionTextFontFamily: 'inherit', + descriptionTitleColor: '#000000', + descriptionTextColor: '#4B5563', descriptionBackgroundColor: 'transparent', }; } @@ -2119,17 +2127,21 @@ const ConstructorPage = ({ mode = 'constructor' }: ConstructorPageProps) => { fontSize: element.descriptionTitleFontSize ? `calc(${element.descriptionTitleFontSize} * 0.25)` : '12px', + fontFamily: element.descriptionTitleFontFamily || 'inherit', + color: element.descriptionTitleColor || '#000000', }} > {element.descriptionTitle || 'TITLE'}

{element.descriptionText && (

{element.descriptionText} @@ -3486,6 +3498,66 @@ const ConstructorPage = ({ mode = 'constructor' }: ConstructorPageProps) => { placeholder='e.g. 36px' /> +

+ + + updateSelectedElement({ + descriptionTitleFontFamily: event.target.value, + }) + } + placeholder='e.g. Arial, Helvetica, sans-serif' + /> +
+
+ + + updateSelectedElement({ + descriptionTextFontFamily: event.target.value, + }) + } + placeholder='e.g. Arial, Helvetica, sans-serif' + /> +
+
+ + + updateSelectedElement({ + descriptionTitleColor: event.target.value, + }) + } + /> +
+
+ + + updateSelectedElement({ + descriptionTextColor: event.target.value, + }) + } + /> +