[WEB-1984] fix: code block padding and margin in pages. (#5152)

This commit is contained in:
Prateek Shourya 2024-07-18 15:28:40 +05:30 committed by GitHub
parent 2554110397
commit 281948c1ce
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
15 changed files with 6 additions and 12 deletions

View file

@ -33,7 +33,7 @@ export const CustomCodeInlineExtension = Mark.create<CodeOptions>({
return { return {
HTMLAttributes: { HTMLAttributes: {
class: class:
"rounded bg-custom-background-80 px-1 py-[2px] font-mono font-medium text-orange-500 border-[0.5px] border-custom-border-200", "rounded bg-custom-background-80 px-[6px] py-[1.5px] font-mono font-medium text-orange-500 border-[0.5px] border-custom-border-200",
spellcheck: "false", spellcheck: "false",
}, },
}; };

View file

@ -40,9 +40,9 @@ export const CodeBlockComponent: React.FC<CodeBlockComponentProps> = ({ node })
<button <button
type="button" type="button"
className={cn( className={cn(
"group/button hidden group-hover/code:flex items-center justify-center absolute top-2 right-2 z-10 size-8 rounded-md bg-custom-background-80 border border-custom-border-200 transition duration-150 ease-in-out", "group/button hidden group-hover/code:flex items-center justify-center absolute top-2 right-2 z-10 size-8 rounded-md bg-custom-background-80 border border-custom-border-200 transition duration-150 ease-in-out backdrop-blur-sm",
{ {
"bg-green-500/10 hover:bg-green-500/10 active:bg-green-500/10": copied, "bg-green-500/30 hover:bg-green-500/30 active:bg-green-500/30": copied,
} }
)} )}
onClick={copyToClipboard} onClick={copyToClipboard}
@ -55,7 +55,7 @@ export const CodeBlockComponent: React.FC<CodeBlockComponentProps> = ({ node })
</button> </button>
</Tooltip> </Tooltip>
<pre className="bg-custom-background-90 text-custom-text-100 rounded-lg p-8 pl-9 pr-4"> <pre className="bg-custom-background-90 text-custom-text-100 rounded-lg p-4 my-2">
<NodeViewContent as="code" className="whitespace-[pre-wrap]" /> <NodeViewContent as="code" className="whitespace-[pre-wrap]" />
</pre> </pre>
</NodeViewWrapper> </NodeViewWrapper>

View file

@ -1 +0,0 @@
export * from "@/plane-web/components/issues/worklog/activity/root";

View file

@ -1 +0,0 @@
export * from "@/plane-web/components/issues/worklog/activity/worklog-create-button";

View file

@ -0,0 +1,2 @@
export * from "./bulk-operations";
export * from "./worklog";

View file

@ -1 +0,0 @@
export * from "@/plane-web/components/issues/worklog/property/root";

View file

@ -1,2 +0,0 @@
export * from "./worklog/activity";
export * from "./worklog/property";

View file

@ -1,2 +0,0 @@
export * from "./root";
export * from "./worklog-create-button";

View file

@ -1 +0,0 @@
export * from "./root";