File tree Expand file tree Collapse file tree
src/ShellDocs.Components/Chrome Expand file tree Collapse file tree Original file line number Diff line number Diff line change 6363 </nav >
6464
6565 <div class =" docs-header-actions" >
66- <button type =" button" class =" docs-header-search" @onclick =" OpenSearch" aria-label =" Search" >
67- <svg viewBox =" 0 0 24 24" fill =" none" stroke =" currentColor" stroke-width =" 2" stroke-linecap =" round" stroke-linejoin =" round" ><circle cx =" 11" cy =" 11" r =" 7" /><path d =" M21 21l-4.35-4.35" /></svg >
68- <span class =" docs-header-search-label" >Search</span >
69- <span class =" docs-header-kbd" >
70- <kbd >Ctrl</kbd >
71- <kbd >K</kbd >
72- </span >
73- </button >
66+ @if (ShowSearch )
67+ {
68+ <button type =" button" class =" docs-header-search" @onclick =" OpenSearch" aria-label =" Search" >
69+ <svg viewBox =" 0 0 24 24" fill =" none" stroke =" currentColor" stroke-width =" 2" stroke-linecap =" round" stroke-linejoin =" round" ><circle cx =" 11" cy =" 11" r =" 7" /><path d =" M21 21l-4.35-4.35" /></svg >
70+ <span class =" docs-header-search-label" >Search </span >
71+ <span class =" docs-header-kbd" >
72+ <kbd >Ctrl </kbd >
73+ <kbd >K </kbd >
74+ </span >
75+ </button >
76+ }
7477
7578 <ThemeToggle />
7679
8790@implements IDisposable
8891
8992@code {
93+ /* Search chip toggle. Marketing pages (HomeLayout) pass false — visitors
94+ there aren't looking to grep docs. Docs pages (DocsLayout TopNav variant)
95+ leave the default true. */
96+ [Parameter ] public bool ShowSearch { get ; set ; } = true ;
97+
9098 private const string DefaultIcon =
9199 " <svg viewBox=\" 0 0 24 24\" fill=\" none\" stroke=\" currentColor\" stroke-width=\" 1.75\" stroke-linecap=\" round\" stroke-linejoin=\" round\" ><rect x=\" 3\" y=\" 3\" width=\" 18\" height=\" 18\" rx=\" 3\" /></svg>" ;
92100
You can’t perform that action at this time.
0 commit comments