diff --git a/app/app.css b/app/app.css
index 99be541..ef30239 100644
--- a/app/app.css
+++ b/app/app.css
@@ -19,6 +19,10 @@ html,
body {
}
+.ProseMirror-focused {
+ @apply outline-none;
+}
+
table.dataTable thead > tr {
border-bottom: 2px solid #c2c2c2;
}
diff --git a/app/components/text-editor/editor-menubar.tsx b/app/components/text-editor/editor-menubar.tsx
index a588219..ac7d570 100644
--- a/app/components/text-editor/editor-menubar.tsx
+++ b/app/components/text-editor/editor-menubar.tsx
@@ -121,7 +121,7 @@ export const EditorMenuBar = (properties: TProperties) => {
return (
<>
-
+
= {
labelClassName?: string
className?: string
inputClassName?: string
+ containerClassName?: string
rules?: RegisterOptions
disabled?: boolean
isRequired?: boolean
@@ -41,11 +44,11 @@ export const TextEditor = >(
label,
name,
labelClassName,
- isRequired,
className,
inputClassName,
category,
disabled = false,
+ containerClassName,
} = properties
const [isPlainHTML, setIsPlainHTML] = useState(false)
@@ -60,7 +63,7 @@ export const TextEditor = >(
} = useRemixFormContext()
const watchContent = watch(name)
- const error = get(errors, name)
+ const error: FieldError = get(errors, name)
const editor = useEditor({
editable: !disabled,
@@ -100,15 +103,16 @@ export const TextEditor = >(
}, [watchContent])
return (
-
+
{label && (
-
+
)}
{isPlainHTML ? (
@@ -118,7 +122,7 @@ export const TextEditor = >(
disabled={disabled}
/>
) : (
- <>
+
>(
editor={editor}
id={id ?? generatedId}
className={twMerge(
- 'prose mb-1 max-h-96 max-w-none cursor-text overflow-y-auto rounded-[0_0_5px_5px] border border-[#D2D2D2] px-4 py-1',
+ 'prose-invert max-h-96 max-w-none cursor-text overflow-y-auto rounded-[0_0_5px_5px] border border-[#D2D2D2] p-2',
darkMode ? 'bg-[#00000055]' : '',
inputClassName,
)}
onClick={() => editor?.commands.focus()}
/>
- >
+
)}
-
- {error && (
-
- {error?.message?.toString()}
-
- )}
-
+
)
}
diff --git a/app/components/ui/input.tsx b/app/components/ui/input.tsx
index 78c0bfb..b8b22bb 100644
--- a/app/components/ui/input.tsx
+++ b/app/components/ui/input.tsx
@@ -23,6 +23,7 @@ type TInputProperties = Omit<
name: Path
rules?: RegisterOptions
containerClassName?: string
+ labelClassName?: string
}
export const Input = >(
@@ -38,6 +39,7 @@ export const Input = >(
disabled,
className,
containerClassName,
+ labelClassName,
...rest
} = properties
const [inputType, setInputType] = useState(type)
@@ -55,7 +57,7 @@ export const Input = >(
disabled={disabled}
id={id}
>
-
@@ -151,6 +153,7 @@ export const CreateContentsPage = () => {
name="live_at"
type="date"
className="border-0 bg-white shadow focus:ring-1 focus:ring-[#2E2F7C] focus:outline-none"
+ labelClassName="text-sm font-medium text-[#363636]"
/>