Skip to content
Snippets Groups Projects
Commit 89d6b0d9 authored by Anthony's avatar Anthony
Browse files

Update UI : label and fix linter issues

parent 60c9177f
No related branches found
No related tags found
1 merge request!10Draft: MigratingAnnotationCreation to MUI5.
Pipeline #1928 failed
...@@ -2,14 +2,15 @@ import React, { useState } from 'react'; ...@@ -2,14 +2,15 @@ import React, { useState } from 'react';
import PropTypes from 'prop-types'; import PropTypes from 'prop-types';
import ReactQuill from 'react-quill'; import ReactQuill from 'react-quill';
import 'react-quill/dist/quill.snow.css'; import 'react-quill/dist/quill.snow.css';
import {styled} from "@mui/material/styles"; import { styled } from '@mui/material/styles';
import {Paper} from "@mui/material"; // include styles
const StyledReactQuill = styled(ReactQuill)(({ theme }) => ({ const StyledReactQuill = styled(ReactQuill)(({ theme }) => ({
".ql-editor":{ '.ql-editor': {
minHeight:'150px' minHeight: '150px',
} },
})); }));
/** Rich text editor for annotation body */
function TextEditor({ annoHtml, updateAnnotationBody }) { function TextEditor({ annoHtml, updateAnnotationBody }) {
const [editorHtml, setEditorHtml] = useState(annoHtml); const [editorHtml, setEditorHtml] = useState(annoHtml);
...@@ -25,7 +26,6 @@ function TextEditor({ annoHtml, updateAnnotationBody }) { ...@@ -25,7 +26,6 @@ function TextEditor({ annoHtml, updateAnnotationBody }) {
<StyledReactQuill <StyledReactQuill
value={editorHtml} value={editorHtml}
onChange={handleChange} onChange={handleChange}
// You can also pass other props to customize the toolbar, etc.
/> />
</div> </div>
); );
......
...@@ -8,7 +8,7 @@ function AnnotationFormContent({ textBody, updateTextBody, textEditorStateBustin ...@@ -8,7 +8,7 @@ function AnnotationFormContent({ textBody, updateTextBody, textEditorStateBustin
return ( return (
<Paper style={{ padding: '5px' }}> <Paper style={{ padding: '5px' }}>
<Typography variant="overline"> <Typography variant="overline">
Metadata Infos
</Typography> </Typography>
<Grid> <Grid>
<TextEditor <TextEditor
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment