Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
canifa_note
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Vũ Hoàng Anh
canifa_note
Commits
98eaff12
Commit
98eaff12
authored
Jan 26, 2026
by
Johnny
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
style: adjust spacing and background colors for improved UI consistency across components
parent
72c7965c
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
25 additions
and
21 deletions
+25
-21
CodeBlock.tsx
web/src/components/MemoContent/CodeBlock.tsx
+4
-4
MermaidBlock.tsx
web/src/components/MemoContent/MermaidBlock.tsx
+1
-1
Table.tsx
web/src/components/MemoContent/Table.tsx
+5
-5
Tag.tsx
web/src/components/MemoContent/Tag.tsx
+4
-1
index.tsx
web/src/components/MemoContent/index.tsx
+1
-0
Blockquote.tsx
web/src/components/MemoContent/markdown/Blockquote.tsx
+1
-1
Heading.tsx
web/src/components/MemoContent/markdown/Heading.tsx
+7
-7
InlineCode.tsx
web/src/components/MemoContent/markdown/InlineCode.tsx
+1
-1
Link.tsx
web/src/components/MemoContent/markdown/Link.tsx
+1
-1
No files found.
web/src/components/MemoContent/CodeBlock.tsx
View file @
98eaff12
...
@@ -115,17 +115,17 @@ export const CodeBlock = ({ children, className, node: _node, ...props }: CodeBl
...
@@ -115,17 +115,17 @@ export const CodeBlock = ({ children, className, node: _node, ...props }: CodeBl
};
};
return
(
return
(
<
pre
className=
"relative my-
3
rounded-lg border border-border bg-muted/30 overflow-hidden"
>
<
pre
className=
"relative my-
2
rounded-lg border border-border bg-muted/30 overflow-hidden"
>
{
/* Header with language label and copy button */
}
{
/* Header with language label and copy button */
}
<
div
className=
"flex items-center justify-between px-3 py-1.5 border-b border-border bg-accent/
3
0"
>
<
div
className=
"flex items-center justify-between px-3 py-1.5 border-b border-border bg-accent/
5
0"
>
<
span
className=
"text-xs font-medium text-muted-foreground uppercase tracking-wide select-none"
>
{
language
||
"text"
}
</
span
>
<
span
className=
"text-xs font-medium text-muted-foreground uppercase tracking-wide select-none"
>
{
language
||
"text"
}
</
span
>
<
button
<
button
onClick=
{
handleCopy
}
onClick=
{
handleCopy
}
className=
{
cn
(
className=
{
cn
(
"inline-flex items-center gap-1.5 px-2 py-0.5 rounded-md text-xs font-medium"
,
"inline-flex items-center gap-1.5 px-2 py-0.5 rounded-md text-xs font-medium"
,
"transition-all duration-200"
,
"transition-all duration-200"
,
"hover:bg-accent
/80
active:scale-95"
,
"hover:bg-accent active:scale-95"
,
copied
?
"text-primary bg-primary/10"
:
"text-muted-foreground
bg-transparent
"
,
copied
?
"text-primary bg-primary/10"
:
"text-muted-foreground"
,
)
}
)
}
aria
-
label=
{
copied
?
"Copied"
:
"Copy code"
}
aria
-
label=
{
copied
?
"Copied"
:
"Copy code"
}
title=
{
copied
?
"Copied!"
:
"Copy code"
}
title=
{
copied
?
"Copied!"
:
"Copy code"
}
...
...
web/src/components/MemoContent/MermaidBlock.tsx
View file @
98eaff12
...
@@ -86,7 +86,7 @@ export const MermaidBlock = ({ children, className }: MermaidBlockProps) => {
...
@@ -86,7 +86,7 @@ export const MermaidBlock = ({ children, className }: MermaidBlockProps) => {
return
(
return
(
<
div
<
div
ref=
{
containerRef
}
ref=
{
containerRef
}
className=
{
cn
(
"mermaid-diagram w-full flex justify-center items-center my-
4
overflow-x-auto"
,
className
)
}
className=
{
cn
(
"mermaid-diagram w-full flex justify-center items-center my-
2
overflow-x-auto"
,
className
)
}
dangerouslySetInnerHTML=
{
{
__html
:
svg
}
}
dangerouslySetInnerHTML=
{
{
__html
:
svg
}
}
/>
/>
);
);
...
...
web/src/components/MemoContent/Table.tsx
View file @
98eaff12
...
@@ -7,7 +7,7 @@ interface TableProps extends React.HTMLAttributes<HTMLTableElement>, ReactMarkdo
...
@@ -7,7 +7,7 @@ interface TableProps extends React.HTMLAttributes<HTMLTableElement>, ReactMarkdo
export
const
Table
=
({
children
,
className
,
node
:
_node
,
...
props
}:
TableProps
)
=>
{
export
const
Table
=
({
children
,
className
,
node
:
_node
,
...
props
}:
TableProps
)
=>
{
return
(
return
(
<
div
className=
"w-full overflow-x-auto rounded-lg border border-border my-
4
"
>
<
div
className=
"w-full overflow-x-auto rounded-lg border border-border my-
2
"
>
<
table
className=
{
cn
(
"w-full border-collapse text-sm"
,
className
)
}
{
...
props
}
>
<
table
className=
{
cn
(
"w-full border-collapse text-sm"
,
className
)
}
{
...
props
}
>
{
children
}
{
children
}
</
table
>
</
table
>
...
@@ -21,7 +21,7 @@ interface TableHeadProps extends React.HTMLAttributes<HTMLTableSectionElement>,
...
@@ -21,7 +21,7 @@ interface TableHeadProps extends React.HTMLAttributes<HTMLTableSectionElement>,
export
const
TableHead
=
({
children
,
className
,
node
:
_node
,
...
props
}:
TableHeadProps
)
=>
{
export
const
TableHead
=
({
children
,
className
,
node
:
_node
,
...
props
}:
TableHeadProps
)
=>
{
return
(
return
(
<
thead
className=
{
cn
(
"bg-accent"
,
className
)
}
{
...
props
}
>
<
thead
className=
{
cn
(
"bg-accent
/50
"
,
className
)
}
{
...
props
}
>
{
children
}
{
children
}
</
thead
>
</
thead
>
);
);
...
@@ -45,7 +45,7 @@ interface TableRowProps extends React.HTMLAttributes<HTMLTableRowElement>, React
...
@@ -45,7 +45,7 @@ interface TableRowProps extends React.HTMLAttributes<HTMLTableRowElement>, React
export
const
TableRow
=
({
children
,
className
,
node
:
_node
,
...
props
}:
TableRowProps
)
=>
{
export
const
TableRow
=
({
children
,
className
,
node
:
_node
,
...
props
}:
TableRowProps
)
=>
{
return
(
return
(
<
tr
className=
{
cn
(
"transition-colors hover:bg-muted/
50"
,
"even:bg-accent/5
0"
,
className
)
}
{
...
props
}
>
<
tr
className=
{
cn
(
"transition-colors hover:bg-muted/
3
0"
,
className
)
}
{
...
props
}
>
{
children
}
{
children
}
</
tr
>
</
tr
>
);
);
...
@@ -59,7 +59,7 @@ export const TableHeaderCell = ({ children, className, node: _node, ...props }:
...
@@ -59,7 +59,7 @@ export const TableHeaderCell = ({ children, className, node: _node, ...props }:
return
(
return
(
<
th
<
th
className=
{
cn
(
className=
{
cn
(
"px-
4 py-3
text-left text-xs font-semibold uppercase tracking-wider text-muted-foreground"
,
"px-
3 py-2
text-left text-xs font-semibold uppercase tracking-wider text-muted-foreground"
,
"border-b-2 border-border"
,
"border-b-2 border-border"
,
className
,
className
,
)
}
)
}
...
@@ -76,7 +76,7 @@ interface TableCellProps extends React.TdHTMLAttributes<HTMLTableCellElement>, R
...
@@ -76,7 +76,7 @@ interface TableCellProps extends React.TdHTMLAttributes<HTMLTableCellElement>, R
export
const
TableCell
=
({
children
,
className
,
node
:
_node
,
...
props
}:
TableCellProps
)
=>
{
export
const
TableCell
=
({
children
,
className
,
node
:
_node
,
...
props
}:
TableCellProps
)
=>
{
return
(
return
(
<
td
className=
{
cn
(
"px-
4 py-3
text-left"
,
className
)
}
{
...
props
}
>
<
td
className=
{
cn
(
"px-
3 py-2
text-left"
,
className
)
}
{
...
props
}
>
{
children
}
{
children
}
</
td
>
</
td
>
);
);
...
...
web/src/components/MemoContent/Tag.tsx
View file @
98eaff12
...
@@ -48,7 +48,10 @@ export const Tag: React.FC<TagProps> = ({ "data-tag": dataTag, children, classNa
...
@@ -48,7 +48,10 @@ export const Tag: React.FC<TagProps> = ({ "data-tag": dataTag, children, classNa
return
(
return
(
<
span
<
span
className=
{
cn
(
"inline-block w-auto text-primary cursor-pointer hover:opacity-80 transition-colors"
,
className
)
}
className=
{
cn
(
"inline-block w-auto text-primary cursor-pointer transition-colors hover:text-primary/80"
,
className
,
)
}
data
-
tag=
{
tag
}
data
-
tag=
{
tag
}
{
...
props
}
{
...
props
}
onClick=
{
handleTagClick
}
onClick=
{
handleTagClick
}
...
...
web/src/components/MemoContent/index.tsx
View file @
98eaff12
...
@@ -40,6 +40,7 @@ const MemoContent = (props: MemoContentProps) => {
...
@@ -40,6 +40,7 @@ const MemoContent = (props: MemoContentProps) => {
ref=
{
memoContentContainerRef
}
ref=
{
memoContentContainerRef
}
className=
{
cn
(
className=
{
cn
(
"relative w-full max-w-full wrap-break-word text-base leading-6"
,
"relative w-full max-w-full wrap-break-word text-base leading-6"
,
"[&>*:last-child]:mb-0"
,
showCompactMode
===
"ALL"
&&
"overflow-hidden"
,
showCompactMode
===
"ALL"
&&
"overflow-hidden"
,
contentClassName
,
contentClassName
,
)
}
)
}
...
...
web/src/components/MemoContent/markdown/Blockquote.tsx
View file @
98eaff12
...
@@ -10,7 +10,7 @@ interface BlockquoteProps extends React.BlockquoteHTMLAttributes<HTMLQuoteElemen
...
@@ -10,7 +10,7 @@ interface BlockquoteProps extends React.BlockquoteHTMLAttributes<HTMLQuoteElemen
*/
*/
export
const
Blockquote
=
({
children
,
className
,
node
:
_node
,
...
props
}:
BlockquoteProps
)
=>
{
export
const
Blockquote
=
({
children
,
className
,
node
:
_node
,
...
props
}:
BlockquoteProps
)
=>
{
return
(
return
(
<
blockquote
className=
{
cn
(
"my-0 mb-2 border-l-4 border-
border pl-3 text-muted-foreground
"
,
className
)
}
{
...
props
}
>
<
blockquote
className=
{
cn
(
"my-0 mb-2 border-l-4 border-
primary/30 pl-3 text-muted-foreground italic
"
,
className
)
}
{
...
props
}
>
{
children
}
{
children
}
</
blockquote
>
</
blockquote
>
);
);
...
...
web/src/components/MemoContent/markdown/Heading.tsx
View file @
98eaff12
...
@@ -14,16 +14,16 @@ export const Heading = ({ level, children, className, node: _node, ...props }: H
...
@@ -14,16 +14,16 @@ export const Heading = ({ level, children, className, node: _node, ...props }: H
const
Component
=
`h
${
level
}
`
as
const
;
const
Component
=
`h
${
level
}
`
as
const
;
const
levelClasses
=
{
const
levelClasses
=
{
1
:
"text-3xl font-bold border-b border-border pb-
1
"
,
1
:
"text-3xl font-bold border-b border-border pb-
2
"
,
2
:
"text-2xl
border-b border-border pb-1
"
,
2
:
"text-2xl
font-semibold border-b border-border pb-1.5
"
,
3
:
"text-xl"
,
3
:
"text-xl
font-semibold
"
,
4
:
"text-
base
"
,
4
:
"text-
lg font-semibold
"
,
5
:
"text-
sm
"
,
5
:
"text-
base font-semibold
"
,
6
:
"text-
s
m text-muted-foreground"
,
6
:
"text-
base font-mediu
m text-muted-foreground"
,
};
};
return
(
return
(
<
Component
className=
{
cn
(
"mt-3 mb-2
font-semibold
leading-tight"
,
levelClasses
[
level
],
className
)
}
{
...
props
}
>
<
Component
className=
{
cn
(
"mt-3 mb-2 leading-tight"
,
levelClasses
[
level
],
className
)
}
{
...
props
}
>
{
children
}
{
children
}
</
Component
>
</
Component
>
);
);
...
...
web/src/components/MemoContent/markdown/InlineCode.tsx
View file @
98eaff12
...
@@ -10,7 +10,7 @@ interface InlineCodeProps extends React.HTMLAttributes<HTMLElement>, ReactMarkdo
...
@@ -10,7 +10,7 @@ interface InlineCodeProps extends React.HTMLAttributes<HTMLElement>, ReactMarkdo
*/
*/
export
const
InlineCode
=
({
children
,
className
,
node
:
_node
,
...
props
}:
InlineCodeProps
)
=>
{
export
const
InlineCode
=
({
children
,
className
,
node
:
_node
,
...
props
}:
InlineCodeProps
)
=>
{
return
(
return
(
<
code
className=
{
cn
(
"font-mono text-sm bg-muted px-1 py-0.5 rounded"
,
className
)
}
{
...
props
}
>
<
code
className=
{
cn
(
"font-mono text-sm bg-muted px-1 py-0.5 rounded
-md
"
,
className
)
}
{
...
props
}
>
{
children
}
{
children
}
</
code
>
</
code
>
);
);
...
...
web/src/components/MemoContent/markdown/Link.tsx
View file @
98eaff12
...
@@ -15,7 +15,7 @@ export const Link = ({ children, className, href, node: _node, ...props }: LinkP
...
@@ -15,7 +15,7 @@ export const Link = ({ children, className, href, node: _node, ...props }: LinkP
href=
{
href
}
href=
{
href
}
target=
"_blank"
target=
"_blank"
rel=
"noopener noreferrer"
rel=
"noopener noreferrer"
className=
{
cn
(
"text-primary underline
transition-opacity hover:opacity-80
"
,
className
)
}
className=
{
cn
(
"text-primary underline
decoration-primary/50 underline-offset-2 transition-colors hover:decoration-primary
"
,
className
)
}
{
...
props
}
{
...
props
}
>
>
{
children
}
{
children
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment