Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ISSUE-2731] chore: custom search component documentation #2845

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions docs/pages/docs/docs-theme/theme-configuration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -404,6 +404,22 @@ to learn how to add custom menus or links to the navbar.
]}
/>

<Callout type="info">
When using a custom search component, make sure to pass on the `className` prop to the root element of the component to ensure proper responsiveness for mobile devices.
```tsx filename="theme.config.jsx"
export default {
search: {
component: ({ className }) => (
<div className={className}>
<CustomSearch type="text" placeholder="Search..." />
</div>
)
}
}

```
</Callout>

### Banner

Show a banner on the top of the website. It can be used to show a warning or a
Expand Down