File tree 3 files changed +27
-21
lines changed
3 files changed +27
-21
lines changed Original file line number Diff line number Diff line change @@ -3,23 +3,25 @@ import clsx from 'clsx'
3
3
import type { JSX } from 'react'
4
4
5
5
export const HeaderActionButton = forwardRef <
6
- HTMLButtonElement ,
7
- JSX . IntrinsicElements [ 'button ' ]
6
+ HTMLDivElement ,
7
+ JSX . IntrinsicElements [ 'div ' ]
8
8
> ( ( { children, ...rest } , ref ) => {
9
9
return (
10
- < button
10
+ < div
11
+ role = "button"
12
+ tabIndex = { 1 }
11
13
className = { clsx (
12
14
'group size-10 rounded-full bg-gradient-to-b' ,
13
- 'from-zinc-50/50 to-white/90 px-3 text-sm ring-1 ring-zinc-900/5 backdrop-blur transition dark:from-zinc-900/50 dark:to-zinc-800/90 dark:ring-white/10 dark:hover:ring-white/20' ,
14
- 'shadow-lg shadow-zinc-800/5' ,
15
+ 'px-3 text-sm ring-1 ring-zinc-900/5 backdrop-blur transition dark:ring-white/10 dark:hover:ring-white/20' ,
16
+
15
17
'flex center' ,
16
18
) }
17
19
{ ...rest }
18
20
ref = { ref }
19
21
aria-label = "Header Action"
20
22
>
21
23
{ children }
22
- </ button >
24
+ </ div >
23
25
)
24
26
} )
25
27
Original file line number Diff line number Diff line change @@ -42,19 +42,21 @@ export const PostMetaBar: Component<{
42
42
</ span >
43
43
</ >
44
44
) }
45
- { ! ! meta . modified && isClient ? (
46
- < FloatPopover
47
- mobileAsSheet
48
- wrapperClassName = "text-xs"
49
- as = "span"
50
- type = "tooltip"
51
- triggerElement = "(已编辑)"
52
- >
53
- 编辑于 < RelativeTime date = { meta . modified } />
54
- </ FloatPopover >
55
- ) : (
56
- < span className = "text-xs" > (已编辑)</ span >
57
- ) }
45
+ { meta . modified ? (
46
+ isClient ? (
47
+ < FloatPopover
48
+ mobileAsSheet
49
+ wrapperClassName = "text-xs"
50
+ as = "span"
51
+ type = "tooltip"
52
+ triggerElement = "(已编辑)"
53
+ >
54
+ 编辑于 < RelativeTime date = { meta . modified } />
55
+ </ FloatPopover >
56
+ ) : (
57
+ < span className = "text-xs" > (已编辑)</ span >
58
+ )
59
+ ) : null }
58
60
</ div >
59
61
60
62
{ ! ! meta . category && (
Original file line number Diff line number Diff line change 11
11
.cl-cardBox {
12
12
@apply overflow-visible;
13
13
}
14
-
14
+ .cl-socialButtons {
15
+ @apply flex flex-wrap items-center justify-center;
16
+ }
15
17
.cl-socialButtonsIconButton {
16
- @apply aspect-square rounded-md bg-accent/5 p-3;
18
+ @apply box-content flex aspect-square h-5 min-h-0 w-5 items-center justify-center rounded-md bg-accent/5 p-3;
17
19
}
18
20
.cl-footer {
19
21
@apply hidden;
You can’t perform that action at this time.
0 commit comments