-
Notifications
You must be signed in to change notification settings - Fork 7
Add option to show a back button to Navigation and View components #51
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
Add option to show a back button to Navigation and View components #51
Conversation
@@ -12,9 +12,11 @@ | |||
class="c-view__navigation" | |||
:assistive-title="assistiveTitle" | |||
:current-tab="activeTab" | |||
:show-back-button="showBackButton ? '' : null" |
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.
Figuring this out took me like 2 hours. Turns out that boolean properties that are passed down need to be properly casted as boolean arguments (like the disabled HTML argument), otherwise they are casted to a string and everything breaks 🥲.
See vuejs/docs#1972 (comment) and the related playground for more info.
|
@@ -1,5 +1,16 @@ | |||
<template> | |||
<div class="navigation-bar"> | |||
<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.
Wouldn't it make sense to use our toolkit button here? or it's better to use just the default one?
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.
I went for the HTML button for ease of use, since it is easier to style. Would be trickier to do so with the toolkit 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.
May be good to consider some way for the future to make the toolkit button usable in those cases, or just drop it for the HTML one 😜
Added the option to show a back button in the Navigation (& View) component:
