Skip to content

Commit 4c8fd70

Browse files
committed
feat: Enable search by default
1 parent db3be0a commit 4c8fd70

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

README.md

+9-9
Original file line numberDiff line numberDiff line change
@@ -98,9 +98,9 @@ You also need to disable the internal store onto the `BarComponent` with the pro
9898
<BarComponent disableInternalStore />
9999
```
100100
101-
## Enable search and AI assistant
101+
## Search and AI assistant
102102
103-
Search and AI assistant is now proposed by the cozy-bar. To enable it, you need to :
103+
Search and AI assistant is now proposed by the cozy-bar. They are enabled by default so you need to:
104104
105105
1. Setup the search
106106
@@ -109,13 +109,7 @@ In the app using the cozy-bar :
109109
- DataProxyProvider must be added before BarProvider
110110
- If you want to use the AI assistant, you need to add [the following permissions](https://github.com/cozy/cozy-libs/tree/master/packages/cozy-search#prerequisite-for-ai-components)
111111
112-
2. Enable the search
113-
114-
```jsx
115-
`<BarComponent searchOptions={{ enabled: true }} />`
116-
```
117-
118-
3. Add the routes
112+
2. Add the routes
119113
120114
These routes allow to display the search and AI assistant dialogs.
121115
@@ -130,6 +124,12 @@ import { BarRoutes } from 'cozy-bar'
130124
</Routes>
131125
```
132126
127+
3. You can still disabled the search
128+
129+
```jsx
130+
`<BarComponent searchOptions={{ enabled: false }} />`
131+
```
132+
133133
## Change theme bar
134134
135135
It's possible to update theme on the cozy-bar with `setTheme` function using the bar context

src/components/BarComponent.jsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ const BarComponent = ({
9191
isPublic = false,
9292
onLogOut,
9393
disableInternalStore = false,
94-
searchOptions = { enabled: false },
94+
searchOptions = { enabled: true },
9595
componentsProps = {}
9696
}) => {
9797
const barContext = useBarContext()

0 commit comments

Comments
 (0)