Apply Material UI component styles to my Custom Component - React

Viewed 17

I built a Rich Text Editor for my react application using Draft.js. I want to apply the default Material UI TextField styling to this component that I have developed. How can I achieve this?

<>
      <Box
        onClick={() => {
          editorRef.current!.focus();
        }}
        sx={} // What should I add here to get default MUI TextField styles (outlined variant)
      >
        <Editor
          editorKey={`content-text-field-${editorKey}`}
          editorState={editorState}
          onChange={onChange}
          plugins={editorPlugins}
          ref={editorRef}
        />

        <TagSuggestions suggestionsComponent={suggestionsComponent} />
      </Box>

      <TextFieldRoot variant="outlined" />
  </>

0 Answers
Related