[WEB-3045] fix: sticky placeholder, gray color value (#6436)
* fix: sticky placeholder * chore: update gray color
This commit is contained in:
parent
58a4b45463
commit
3a86fff7c1
3 changed files with 8 additions and 4 deletions
|
|
@ -8,7 +8,7 @@ export const STICKY_COLORS_LIST: {
|
|||
{
|
||||
key: "gray",
|
||||
label: "Gray",
|
||||
backgroundColor: "var(--editor-colors-gray-background)",
|
||||
backgroundColor: "rgba(var(--color-background-90))",
|
||||
},
|
||||
{
|
||||
key: "peach",
|
||||
|
|
|
|||
|
|
@ -43,7 +43,6 @@ export const StickyEditor = React.forwardRef<EditorRefApi, StickyEditorWrapperPr
|
|||
showToolbarInitially = true,
|
||||
showToolbar = true,
|
||||
parentClassName = "",
|
||||
placeholder = "Add comment...",
|
||||
uploadFile,
|
||||
...rest
|
||||
} = props;
|
||||
|
|
@ -78,7 +77,6 @@ export const StickyEditor = React.forwardRef<EditorRefApi, StickyEditorWrapperPr
|
|||
mentionHandler={{
|
||||
renderComponent: () => <></>,
|
||||
}}
|
||||
placeholder={placeholder}
|
||||
containerClassName={cn(containerClassName, "relative")}
|
||||
{...rest}
|
||||
/>
|
||||
|
|
|
|||
|
|
@ -4,6 +4,8 @@ import { Controller, useForm } from "react-hook-form";
|
|||
import { EditorRefApi } from "@plane/editor";
|
||||
// plane types
|
||||
import { TSticky } from "@plane/types";
|
||||
// plane utils
|
||||
import { isCommentEmpty } from "@plane/utils";
|
||||
// hooks
|
||||
import { useWorkspace } from "@/hooks/store";
|
||||
// components
|
||||
|
|
@ -67,7 +69,11 @@ export const StickyInput = (props: TProps) => {
|
|||
onChange(description_html);
|
||||
handleSubmit(handleFormSubmit)();
|
||||
}}
|
||||
placeholder="Click to type here"
|
||||
placeholder={(_, value) => {
|
||||
const isContentEmpty = isCommentEmpty(value);
|
||||
if (!isContentEmpty) return "";
|
||||
return "Click to type here";
|
||||
}}
|
||||
containerClassName="px-0 text-base min-h-[250px] w-full"
|
||||
uploadFile={async () => ""}
|
||||
showToolbar={showToolbar}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue