-
Notifications
You must be signed in to change notification settings - Fork 0
Feature #160722817 – Add search examples below the search box #8
Feature #160722817 – Add search examples below the search box #8
Conversation
links.map( | ||
(link, index) => | ||
<span key={index}> | ||
{index === 0 && ` `}<a href={link.url}>{link.text}</a>{index < links.length - 1 && `, `} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The last link should not be followed by a comma I believe.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It won’t be, notice that the right hand side is links.length -1
instead of links.length
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's weird since I try the same test searchExamples
data in the local search form branch, which works fine. However, it appears differently on the atlas branch.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, yes, that’s because the bundles were from the penultimate release. If you generate the bundles yourself and try it out it’ll be ok.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All looks good. I would suggest adding a searchExamples
prop in one of the html demos.
If we need more flexibility we can let the client insert a full React component, but for the current story this is enough, I guess.