File tree Expand file tree Collapse file tree 2 files changed +22
-13
lines changed
packages/gitbook/src/components/DocumentView Expand file tree Collapse file tree 2 files changed +22
-13
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ " gitbook " : patch
3
+ ---
4
+
5
+ Add margin to adjacent buttons
Original file line number Diff line number Diff line change @@ -17,18 +17,22 @@ export async function InlineButton(props: InlineProps<api.DocumentInlineButton>)
17
17
}
18
18
19
19
return (
20
- < Button
21
- href = { resolved . href }
22
- label = { inline . data . label }
23
- // TODO: use a variant specifically for user-defined buttons.
24
- variant = { inline . data . kind }
25
- insights = { {
26
- type : 'link_click' ,
27
- link : {
28
- target : inline . data . ref ,
29
- position : api . SiteInsightsLinkPosition . Content ,
30
- } ,
31
- } }
32
- />
20
+ // Set the leading to have some vertical space between adjacent buttons
21
+ < span className = "inline-button leading-[3rem] [&:has(+.inline-button)]:mr-2" >
22
+ < Button
23
+ href = { resolved . href }
24
+ label = { inline . data . label }
25
+ // TODO: use a variant specifically for user-defined buttons.
26
+ variant = { inline . data . kind }
27
+ className = "leading-normal"
28
+ insights = { {
29
+ type : 'link_click' ,
30
+ link : {
31
+ target : inline . data . ref ,
32
+ position : api . SiteInsightsLinkPosition . Content ,
33
+ } ,
34
+ } }
35
+ />
36
+ </ span >
33
37
) ;
34
38
}
You can’t perform that action at this time.
0 commit comments