Simple Implementation In Stroybook Of SearchInput

By the way, I added *~ to .gitignore, which are the backups of emacs editor.
See the Storybook of SearchInput.
Problems:
* I found no way to separate the heading of the search results from the first item. Do we have to write a complete new component for this?
* The incoming data must by sorted by type before passed to the component. I added keys searchType and firstType, to identify the type (post/user) (may be as a locale) and to know when I have to place the heading.
This commit is contained in:
Moriz Wahl 2019-11-17 00:01:44 +01:00
parent 3e6124fd92
commit 81842592df

View File

@ -6,10 +6,9 @@ import helpers from '~/storybook/helpers'
helpers.init()
export const results = [
/*
{
heading: 'Contributions'
},*/
},
{
id: 'de100841-2336-4b01-a574-f1bd2c0b262a',
searchType: 'Contributions',
@ -66,9 +65,9 @@ export const results = [
slug: 'louie',
},
},
/* {
{
heading: 'Users'
},*/
},
{
id: 'u1',
searchType: 'Users',