feat: 🎸 Refactor details of the component

Delete unnecessary <span>. Make icon smaller and aligned. Fix linting
issues.
This commit is contained in:
Carlos Alcaide committed 2021-07-12 09:46:56 -07:00
1 parent b272f85e68
commit 9bcb402fa2
4 files changed
+12 -11

No files matched your search

+2
View File
@@ -95,12 +95,14 @@
p {
margin-bottom: 0;
}
.rose-table-header-cell {
p {
color: var(--ui-gray-subtler-1);
font-weight: normal;
}
}
.rose-form-checkbox {
margin-bottom: 0;
@@ -1,7 +1,7 @@
<div class='hidden-secret'>
<Rose::Icon
@name={{if this.secretVisible 'visibility-show' 'visibility-hide'}}
@size='large'
@name={{if this.isHidden 'visibility-show' 'visibility-hide'}}
@size='medium'
{{on 'click' this.toggleSecretVisibility}}
/>
<Copyable
@@ -9,12 +9,10 @@
@buttonText={{t 'actions.copy-to-clipboard'}}
@acknowledgeText={{t 'states.copied'}}
>
<span>
{{#if this.secretVisible}}
{{@secret}}
{{else}}
{{this.textMask}}
{{/if}}
</span>
{{#if this.isHidden}}
{{@secret}}
{{else}}
{{this.textMask}}
{{/if}}
</Copyable>
</div>
@@ -5,10 +5,10 @@ import { tracked } from '@glimmer/tracking';
export default class HiddenSecretComponent extends Component {
textMask = '■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■';
@tracked secretVisible = false;
@tracked isHidden = false;
@action
toggleSecretVisibility() {
this.secretVisible = !this.secretVisible;
this.isHidden = !this.isHidden;
}
}
+1
View File
@@ -481,6 +481,7 @@ $chevron-down: url("data:image/svg+xml;utf-8,<svg viewBox='0 0 24 24' fill='%231
color: var(--ui-gray-subtler-2);
.rose-icon {
margin-top: sizing.rems(xxxs);
margin-right: sizing.rems(s);
}