From 595320dd1b92a78c77a43e7111d15138a93ed0df Mon Sep 17 00:00:00 2001 From: Moriz Wahl Date: Sun, 17 Nov 2019 00:01:44 +0100 Subject: [PATCH] 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. --- webapp/components/SearchInput/SearchInput.story.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/webapp/components/SearchInput/SearchInput.story.js b/webapp/components/SearchInput/SearchInput.story.js index 9a2a4f2ae..563022877 100644 --- a/webapp/components/SearchInput/SearchInput.story.js +++ b/webapp/components/SearchInput/SearchInput.story.js @@ -99,6 +99,8 @@ export const results = [ { id: '7b654f72-f4da-4315-8bed-39de0859754b', searchType: 'Users', + avatar: + 'https://steamcdn-a.akamaihd.net/steamcommunity/public/images/avatars/db/dbc9e03ebcc384b920c31542af2d27dd8eea9dc2_full.jpg', name: 'Tonya Mohr', label: 'Tonya Mohr', slug: 'tonya-mohr',