@toptal/davinci-storybook-full-text-search-addon
Version:
Full text search addon for Storybook
30 lines (18 loc) • 835 B
Markdown
# Storybook Addon Full Text Search
Storybook Addon `Full Text Search` allows users to search any static text to find related story or component
### Installation
#### 1. Install addon
```bash
yarn add -D @toptal/davinci-storybook-full-text-search-addon
```
#### 2. Register this addon to Storybook
```js
// .storybook/main.js
module.exports = {
addons: ['@toptal/davinci-storybook-full-text-search-addon'],
}
```
This `full-text-search` addon also uses Picasso and brings `@toptal/picasso`.
### How it works
For UI, addon inserts a `Full Text Search` button into sidebar and a modal component to show the search input and results.
For computation and searching, addon will generate an index file with respect to stories inside the project and use this index file to search the text for all text content inside a story file