use markdown diff instead of two code blocks

Signed-off-by: Emma Indal <emmai@spotify.com>
This commit is contained in:
Emma Indal
2021-12-02 09:46:37 +01:00
parent 6130421aa2
commit 03eb26f8e8
+5 -18
View File
@@ -6,28 +6,15 @@
Search Modal now relies on the Search Context to access state and state setter. If you use the SidebarSearchModal as described in the [getting started documentation](https://backstage.io/docs/features/search/getting-started#using-the-search-modal), make sure to update your code with the SearchContextProvider.
Before:
```tsx
```diff
export const Root = ({ children }: PropsWithChildren<{}>) => (
<SidebarPage>
<Sidebar>
<SidebarLogo />
<SidebarSearchModal />
- <SidebarSearchModal />
+ <SearchContextProvider>
+ <SidebarSearchModal />
+ </SearchContextProvider>
<SidebarDivider />
...
```
Now:
```tsx
export const Root = ({ children }: PropsWithChildren<{}>) => (
<SidebarPage>
<Sidebar>
<SidebarLogo />
<SearchContextProvider>
<SidebarSearchModal />
</SearchContextProvider>
<SidebarDivider />
...
```