Skip to content

Commit 0e9085e

Browse files
committed
Theme fix for the dropdown and Richtext
1 parent 3173e2e commit 0e9085e

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

packages/react-sdk-components/src/components/designSystemExtension/RichTextEditor/RichTextEditor.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import React, { forwardRef } from 'react';
22
import { Editor } from '@tinymce/tinymce-react';
33
import { FormControl, FormHelperText, InputLabel, useTheme } from '@mui/material';
44
import makeStyles from '@mui/styles/makeStyles';
5-
65
import { useAfterInitialEffect, useConsolidatedRef, useUID } from '../../../hooks';
76

87
const useStyles = makeStyles(theme => ({
@@ -88,7 +87,7 @@ const RichTextEditor = forwardRef(function RichTextEditor(props: RichTextEditorP
8887
initialValue={defaultValue}
8988
disabled={disabled}
9089
init={{
91-
skin: 'oxide-dark', // or 'oxide' for light theme
90+
skin: theme.palette.mode === 'dark' ? 'oxide-dark' : 'oxide',
9291
// ...other TinyMCE config...
9392
content_style: `
9493
body {
@@ -110,6 +109,10 @@ const RichTextEditor = forwardRef(function RichTextEditor(props: RichTextEditorP
110109
font-size: 1em;
111110
font-family: inherit;
112111
}
112+
.mce-content-body[data-mce-placeholder]:not(.mce-visualblocks)::before {
113+
color: ${theme.palette.text.secondary};
114+
opacity: 0.7;
115+
}
113116
/* Add more styles as needed */
114117
`,
115118
placeholder,

packages/react-sdk-components/src/theme.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ const darkTheme = createTheme({
247247
},
248248
background: {
249249
// default: 'radial-gradient(178.62% 112% at 50% -12%, #0B0F2A 69.96%, #111951 89.19%)',
250-
paper: 'rgba(255, 255, 255, 0.1)' // card-bg
250+
paper: '#18132c'
251251
},
252252
text: {
253253
primary: '#e0e0e0', // text-light

0 commit comments

Comments
 (0)