@@ -50,19 +50,6 @@ function InhRef() {
5050 return < span className = "inherited-ref" title = "inherited reference" > & </ span >
5151}
5252
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-
6653export function Help ( { show, setShow, style} ) {
6754 return < >
6855 < Offcanvas placement = "end" scroll show = { show } onHide = { ( ) => setShow ( false ) } >
@@ -108,6 +95,8 @@ export function Help({show, setShow, style}) {
10895 </ >
10996}
11097
98+ const availableStyles = [ 'Sequent' , 'SequentBindingMode' ] ;
99+
111100export function MainNavBar ( { compare, setCompare, style, setStyle} ) {
112101 const navigate = useNavigate ( )
113102 const [ searchParams , setSearchParams ] = useSearchParams ( ) ;
@@ -124,14 +113,14 @@ export function MainNavBar({compare, setCompare, style, setStyle}) {
124113 const [ helpShow , setHelpShow ] = useState ( false ) ;
125114
126115 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 > } >
129119 < 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 >
135124 </ OverlayTrigger >
136125 } ) ;
137126
0 commit comments