File tree 2 files changed +6
-7
lines changed
packages/gitbook/src/components/DocumentView
2 files changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -25,6 +25,8 @@ export function Caption(
25
25
block : DocumentBlockImage | DocumentBlockDrawing | DocumentBlockEmbed | DocumentBlockFile ;
26
26
} & DocumentContextProps ,
27
27
) {
28
+ const needsBorder = props . block . type === 'embed' || props . block . type === 'file' ;
29
+
28
30
const {
29
31
children,
30
32
document,
@@ -37,9 +39,10 @@ export function Caption(
37
39
'after:block' ,
38
40
'after:absolute' ,
39
41
'after:-inset-[0]' ,
40
- 'dark:after:mix-blend-plus-lighter' ,
41
- 'after:pointer-events-none' ,
42
42
fit ? 'w-fit' : null ,
43
+ needsBorder
44
+ ? 'rounded straight-corners:rounded-none after:border-dark/2 after:border after:rounded straight-corners:after:rounded-none dark:after:border-light/1 dark:after:mix-blend-plus-lighter after:pointer-events-none'
45
+ : null ,
43
46
] ,
44
47
style,
45
48
} = props ;
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ export async function File(props: BlockProps<DocumentBlockFile>) {
21
21
const contentType = getSimplifiedContentType ( file . contentType ) ;
22
22
23
23
return (
24
- < Caption { ...props } wrapperStyle = { [ ] } >
24
+ < Caption { ...props } >
25
25
< Link
26
26
href = { file . downloadURL }
27
27
download = { file . name }
@@ -34,13 +34,9 @@ export async function File(props: BlockProps<DocumentBlockFile>) {
34
34
'flex' ,
35
35
'flex-row' ,
36
36
'items-center' ,
37
- 'border' ,
38
37
'px-5' ,
39
38
'py-3' ,
40
- 'border-dark/3' ,
41
- 'rounded-lg' ,
42
39
'hover:text-primary-600' ,
43
- 'dark:border-light/3' ,
44
40
'dark:hover:text-primary-300' ,
45
41
) }
46
42
>
You can’t perform that action at this time.
0 commit comments