File tree Expand file tree Collapse file tree 3 files changed +13
-7
lines changed
gitbook/src/components/DocumentView/OpenAPI Expand file tree Collapse file tree 3 files changed +13
-7
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ ' @gitbook/react-openapi ' : patch
3
+ ' gitbook ' : patch
4
+ ---
5
+
6
+ Fix openapi CR preview
Original file line number Diff line number Diff line change @@ -688,18 +688,18 @@ body:has(.openapi-select-popover) {
688
688
}
689
689
690
690
.openapi-disclosure-group-trigger {
691
- @apply flex w-full items-baseline gap-3 transition-all relative flex-1 p-3 -outline-offset-1;
691
+ @apply flex w-full cursor-pointer items-baseline gap-3 transition-all relative flex-1 p-3 -outline-offset-1;
692
692
}
693
693
694
694
.openapi-disclosure-group-label {
695
695
@apply flex flex-wrap items-baseline gap-x-3 gap-y-1 flex-1 truncate;
696
696
}
697
697
698
- .openapi-disclosure-group-trigger : disabled {
698
+ .openapi-disclosure-group-trigger [ aria- disabled= "true" ] {
699
699
@apply cursor-default hover:bg-inherit;
700
700
}
701
701
702
- .openapi-disclosure-group-trigger : disabled .openapi-disclosure-group-icon {
702
+ .openapi-disclosure-group-trigger [ aria- disabled= "true" ] .openapi-disclosure-group-icon {
703
703
@apply invisible;
704
704
}
705
705
Original file line number Diff line number Diff line change @@ -76,7 +76,7 @@ function DisclosureItem(props: {
76
76
} ) ;
77
77
78
78
const panelRef = useRef < HTMLDivElement | null > ( null ) ;
79
- const triggerRef = useRef < HTMLButtonElement | null > ( null ) ;
79
+ const triggerRef = useRef < HTMLDivElement | null > ( null ) ;
80
80
const isDisabled = groupState ?. isDisabled || ! group . tabs ?. length || false ;
81
81
const { buttonProps : triggerProps , panelProps } = useDisclosure (
82
82
{
@@ -96,11 +96,11 @@ function DisclosureItem(props: {
96
96
97
97
return (
98
98
< div className = "openapi-disclosure-group" aria-expanded = { state . isExpanded } >
99
- < button
99
+ < div
100
100
slot = "trigger"
101
101
ref = { triggerRef }
102
102
{ ...mergeProps ( buttonProps , focusProps ) }
103
- disabled = { isDisabled }
103
+ aria- disabled= { isDisabled }
104
104
style = { {
105
105
outline : isFocusVisible
106
106
? '2px solid rgb(var(--primary-color-500)/0.4)'
@@ -146,7 +146,7 @@ function DisclosureItem(props: {
146
146
</ div >
147
147
) : null }
148
148
</ div >
149
- </ button >
149
+ </ div >
150
150
151
151
{ state . isExpanded && selectedTab && (
152
152
< div className = "openapi-disclosure-group-panel" ref = { panelRef } { ...panelProps } >
You can’t perform that action at this time.
0 commit comments