Skip to content
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

Update: padlock replaces icon when trickle button locked (#217) #218

Merged
merged 2 commits into from
Mar 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 4 additions & 0 deletions less/trickle-button.less
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@
.icon-controls-small-down;
}

&__btn.is-locked &__btn-icon .icon {
.icon-padlock-locked;
}

// If full width config is enabled, button is fixed to the bottom of the screen
// --------------------------------------------------
&.is-full-width &__inner {
Expand Down
2 changes: 1 addition & 1 deletion templates/trickle-button.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<div class="trickle__inner js-trickle-btn-container {{_trickle._button._component}}__inner {{#unless _isButtonVisible}} u-display-none{{/unless}}">

<button {{#if buttonAriaLabel}}aria-label="{{buttonAriaLabel}}" {{/if}}class="trickle__btn js-trickle-btn{{#if _trickle._button._hasIcon}} btn-icon{{/if}}{{#if buttonText}} btn-text{{/if}}"{{#if _isButtonDisabled}} aria-disabled="true"{{/if}}>
<button {{#if buttonAriaLabel}}aria-label="{{buttonAriaLabel}}" {{/if}}class="trickle__btn js-trickle-btn{{#if _isButtonDisabled}} is-disabled{{#if _isButtonVisible}} is-locked{{/if}}{{/if}}{{#if _trickle._button._hasIcon}} btn-icon{{/if}}{{#if buttonText}} btn-text{{/if}}"{{#if _isButtonDisabled}} aria-disabled="true"{{/if}}>

{{#if _trickle._button._hasIcon}}
<span class="trickle__btn-icon">
Expand Down