-
Notifications
You must be signed in to change notification settings - Fork 4
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
init Back to top #585
base: develop
Are you sure you want to change the base?
init Back to top #585
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.
Hi @SenChung,
This component is not showing on the PR's Storybook.
https://660e3e06af8da379e06be302-zrpzxabqbq.chromatic.com/?path=/story/3-components-backtotop--default
<a href="#" id="backToTop" class="qld__btn qld__btn--floating qld__btn--back-to-top" aria-label="Back to top"> | ||
<span>Back to top</span> | ||
<div class="qld__widgets {{#if dynamic}}fixed{{/if}}"> | ||
<a href="#" id="backToTop" class="qld__btn qld__btn--floating qld__btn--back-to-top show" data-offset="{{offset}}" data-dynamic="{{dynamic}}" aria-label="{{text}}"> |
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.
should have 'default' if 'text' is not set, i.e. 'Back to top'
offset default should be '100'.
Also why is dynamic when true == fix.
and data-dynamic default if not set is 'false'
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.
These issues are now fixed with the latest push
reverted: package-lock.json to the develop version
Init Back To Top setup.
This is very much based on the work the Steve has done within The Vanilla Project.
There are a few small differences with the id of backToTop and CSS/SCSS names + the JS.