New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
M3-1988 Tag links #4195
M3-1988 Tag links #4195
Conversation
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.
Nice work – functionality works well. Good call setting the root node component to button
.
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.
Move the router decorator to be globally available and we're good to go.
src/components/Tag/Tag.stories.tsx
Outdated
|
||
import ThemeDecorator from '../../utilities/storybookDecorators'; | ||
import Tag from './Tag'; | ||
|
||
storiesOf('Tags', module) | ||
.addDecorator(ThemeDecorator) | ||
.addDecorator(StoryRouter()) |
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.
Can/should this be added globally like the ThemeDecorator is now? (Note the Storybook theme switcher PR has been merged)
added: - storybook-router-react added as a dev dependency (allows using a router decorator so that stories for components with Router don't break) changed: - Tag is now a routable component - Make tags clickable in Tags.tsx and SearchSuggestion.tsx - Update tests - When clicked, a Tag will link to the search results page for its label (i.e. /search/?query=tag-name)
added:
so that stories for components with Router don't break)
changed:
(i.e. /search/?query=tag-name)