From 4cfacbc1e3129b9dbd43d8d7e7d5fdd598dd98c5 Mon Sep 17 00:00:00 2001 From: Nate Kelley Date: Thu, 21 Aug 2025 21:37:28 -0600 Subject: [PATCH] read only partial fix --- apps/web/src/components/ui/report/Editor.tsx | 13 ++++++------- .../src/components/ui/report/EditorContainer.tsx | 4 ++-- apps/web/src/components/ui/report/ReportEditor.tsx | 5 ++--- 3 files changed, 10 insertions(+), 12 deletions(-) diff --git a/apps/web/src/components/ui/report/Editor.tsx b/apps/web/src/components/ui/report/Editor.tsx index b9a3aef2b..b5ef1392e 100644 --- a/apps/web/src/components/ui/report/Editor.tsx +++ b/apps/web/src/components/ui/report/Editor.tsx @@ -21,14 +21,13 @@ const editorVariants = cva( variant: 'default' }, variants: { - disabled: { - true: 'cursor-not-allowed opacity-50' + readOnly: { + true: '' }, focused: { true: 'ring-2 ring-ring ring-offset-2' }, variant: { - ai: 'w-full px-0 text-base md:text-sm', comment: cn('rounded-none border-none bg-transparent text-sm'), default: 'px-16 pt-4 pb-72 text-base sm:px-[max(64px,calc(50%-350px))]', fullWidth: 'px-16 pt-4 pb-72 text-base sm:px-24', @@ -41,20 +40,20 @@ const editorVariants = cva( export type EditorProps = PlateContentProps & VariantProps; export const Editor = React.forwardRef( - ({ className, disabled, focused, variant, ...props }, ref) => { + ({ className, readOnly, focused, variant, ...props }, ref) => { return ( ); diff --git a/apps/web/src/components/ui/report/EditorContainer.tsx b/apps/web/src/components/ui/report/EditorContainer.tsx index 0e3d2ca87..d50a786dd 100644 --- a/apps/web/src/components/ui/report/EditorContainer.tsx +++ b/apps/web/src/components/ui/report/EditorContainer.tsx @@ -26,8 +26,8 @@ const editorContainerVariants = cva( 'has-data-readonly:w-fit has-data-readonly:cursor-default has-data-readonly:border-transparent has-data-readonly:focus-within:[box-shadow:none]' ) }, - readonly: { - true: 'cursor-default pointer-events-none user-select-none' + readOnly: { + true: 'cursor-default user-select-none ' } }, defaultVariants: { diff --git a/apps/web/src/components/ui/report/ReportEditor.tsx b/apps/web/src/components/ui/report/ReportEditor.tsx index 49b35ba07..a010588b0 100644 --- a/apps/web/src/components/ui/report/ReportEditor.tsx +++ b/apps/web/src/components/ui/report/ReportEditor.tsx @@ -118,9 +118,7 @@ export const ReportEditor = React.memo( if (!editor) return null; return ( - +