-
Notifications
You must be signed in to change notification settings - Fork 524
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(infiniteHits): add previous button (#3645)
- Loading branch information
Showing
17 changed files
with
838 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import { action } from '@storybook/addon-actions'; | ||
|
||
const urlLogger = action('Routing state'); | ||
|
||
interface MemoryState { | ||
[key: string]: string | number; | ||
} | ||
|
||
export class MemoryRouter { | ||
private _memoryState: MemoryState; | ||
constructor(initialState: MemoryState = {}) { | ||
this._memoryState = initialState; | ||
} | ||
write(routeState: MemoryState) { | ||
this._memoryState = routeState; | ||
urlLogger(JSON.stringify(routeState, null, 2)); | ||
} | ||
read() { | ||
return this._memoryState; | ||
} | ||
createURL() { | ||
return ''; | ||
} | ||
onUpdate() { | ||
return {}; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/instantsearch.css@7.1.1/themes/algolia.min.css"> | ||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/instantsearch.css@7.2.0/themes/algolia.min.css"> | ||
<link rel="stylesheet" href="storybook.css"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.