@@ -21,6 +21,7 @@ import { FunctionComponent, useState, useEffect, ChangeEvent } from 'react';
21
21
import { css , styled , t , useTheme } from '@superset-ui/core' ;
22
22
import { useSingleViewResource } from 'src/views/CRUD/hooks' ;
23
23
import { useThemeContext } from 'src/theme/ThemeProvider' ;
24
+ import SupersetText from 'src/utils/textUtils' ;
24
25
25
26
import { Icons } from '@superset-ui/core/components/Icons' ;
26
27
import withToasts from 'src/components/MessageToasts/withToasts' ;
@@ -106,6 +107,14 @@ const ThemeModal: FunctionComponent<ThemeModalProps> = ({
106
107
107
108
const canDevelopThemes = canDevelop ;
108
109
110
+ // SupersetText URL configurations
111
+ const themeEditorUrl =
112
+ SupersetText ?. THEME_MODAL ?. THEME_EDITOR_URL ||
113
+ 'https://ant.design/theme-editor' ;
114
+ const documentationUrl =
115
+ SupersetText ?. THEME_MODAL ?. DOCUMENTATION_URL ||
116
+ 'https://superset.apache.org/docs/configuration/theming/' ;
117
+
109
118
// JSON validation annotations using reusable hook
110
119
const jsonAnnotations = useJsonValidation ( currentTheme ?. json_data , {
111
120
enabled : ! isReadOnly ,
@@ -350,15 +359,15 @@ const ThemeModal: FunctionComponent<ThemeModalProps> = ({
350
359
< span >
351
360
{ t ( 'Design with' ) } { ' ' }
352
361
< a
353
- href = "https://ant.design/theme-editor"
362
+ href = { themeEditorUrl }
354
363
target = "_blank"
355
364
rel = "noopener noreferrer"
356
365
>
357
366
{ t ( 'Ant Design Theme Editor' ) }
358
367
</ a >
359
368
{ t ( ', then paste the JSON below. See our' ) } { ' ' }
360
369
< a
361
- href = "https://superset.apache.org/docs/configuration/theming/"
370
+ href = { documentationUrl }
362
371
target = "_blank"
363
372
rel = "noopener noreferrer"
364
373
>
0 commit comments