From 89d6b0d9120f1042c1cef846626b7c6f399a024f Mon Sep 17 00:00:00 2001 From: Anthony Geourjon <anthony.geourjon@tetras-libre.fr> Date: Tue, 6 Feb 2024 11:38:28 +0100 Subject: [PATCH] Update UI : label and fix linter issues --- src/TextEditor.js | 24 ++++++++++----------- src/annotationForm/AnnotationFormContent.js | 2 +- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/TextEditor.js b/src/TextEditor.js index f8a2780..74ee813 100644 --- a/src/TextEditor.js +++ b/src/TextEditor.js @@ -2,14 +2,15 @@ import React, { useState } from 'react'; import PropTypes from 'prop-types'; import ReactQuill from 'react-quill'; import 'react-quill/dist/quill.snow.css'; -import {styled} from "@mui/material/styles"; -import {Paper} from "@mui/material"; // include styles +import { styled } from '@mui/material/styles'; const StyledReactQuill = styled(ReactQuill)(({ theme }) => ({ - ".ql-editor":{ - minHeight:'150px' -} + '.ql-editor': { + minHeight: '150px', + }, })); + +/** Rich text editor for annotation body */ function TextEditor({ annoHtml, updateAnnotationBody }) { const [editorHtml, setEditorHtml] = useState(annoHtml); @@ -21,13 +22,12 @@ function TextEditor({ annoHtml, updateAnnotationBody }) { }; return ( - <div> - <StyledReactQuill - value={editorHtml} - onChange={handleChange} - // You can also pass other props to customize the toolbar, etc. - /> - </div> + <div> + <StyledReactQuill + value={editorHtml} + onChange={handleChange} + /> + </div> ); } diff --git a/src/annotationForm/AnnotationFormContent.js b/src/annotationForm/AnnotationFormContent.js index aa2fc65..86596e1 100644 --- a/src/annotationForm/AnnotationFormContent.js +++ b/src/annotationForm/AnnotationFormContent.js @@ -8,7 +8,7 @@ function AnnotationFormContent({ textBody, updateTextBody, textEditorStateBustin return ( <Paper style={{ padding: '5px' }}> <Typography variant="overline"> - Metadata + Infos </Typography> <Grid> <TextEditor -- GitLab