@@ -50,19 +50,6 @@ function InhRef() {
50
50
return < span className = "inherited-ref" title = "inherited reference" > & </ span >
51
51
}
52
52
53
- const availableStyles = [
54
- {
55
- name : 'Sequent' ,
56
- display : < > inh, _ ⊢ p: < InhRef /> T</ > ,
57
- doc : "Track the type that the user observes and whether the outermost reference in the type is real or inherited"
58
- } ,
59
- {
60
- name : 'SequentBindingMode' ,
61
- display : < > ref, _ ⊢ p: T</ > ,
62
- doc : "Track the type of the matched place and the current binding mode"
63
- } ,
64
- ] ;
65
-
66
53
export function Help ( { show, setShow, style} ) {
67
54
return < >
68
55
< Offcanvas placement = "end" scroll show = { show } onHide = { ( ) => setShow ( false ) } >
@@ -108,6 +95,8 @@ export function Help({show, setShow, style}) {
108
95
</ >
109
96
}
110
97
98
+ const availableStyles = [ 'Sequent' , 'SequentBindingMode' ] ;
99
+
111
100
export function MainNavBar ( { compare, setCompare, style, setStyle} ) {
112
101
const navigate = useNavigate ( )
113
102
const [ searchParams , setSearchParams ] = useSearchParams ( ) ;
@@ -124,14 +113,14 @@ export function MainNavBar({compare, setCompare, style, setStyle}) {
124
113
const [ helpShow , setHelpShow ] = useState ( false ) ;
125
114
126
115
const currentStyle = style ;
127
- const styles = availableStyles . map ( style => {
128
- return < OverlayTrigger key = { style . name } placement = "bottom" overlay = { < Tooltip > { style . doc } </ Tooltip > } >
116
+ const styles = availableStyles . map ( style_name => {
117
+ let style = PredicateStyleJs . from_name ( style_name ) ;
118
+ return < OverlayTrigger key = { style_name } placement = "bottom" overlay = { < Tooltip > { style . doc ( ) } </ Tooltip > } >
129
119
< Button
130
- active = { currentStyle . to_name ( ) == style . name }
131
- onClick = { ( ) => setStyle ( PredicateStyleJs . from_name ( style . name ) ) }
132
- >
133
- { style . display }
134
- </ Button >
120
+ active = { currentStyle . to_name ( ) == style_name }
121
+ onClick = { ( ) => setStyle ( style ) }
122
+ dangerouslySetInnerHTML = { { __html : style . display_generic_predicate ( ) } }
123
+ > </ Button >
135
124
</ OverlayTrigger >
136
125
} ) ;
137
126
0 commit comments