Commit c088057f authored by George Tsiolis's avatar George Tsiolis

Added variables to styles and computed property

parent 6920bfd1
...@@ -111,7 +111,7 @@ export default { ...@@ -111,7 +111,7 @@ export default {
/> />
<icon <icon
name="search" name="search"
class="search-icon" class="dropdown-input-search"
aria-hidden="true" aria-hidden="true"
data-hidden="true" data-hidden="true"
/> />
......
...@@ -450,6 +450,14 @@ export default { ...@@ -450,6 +450,14 @@ export default {
this.canRetry this.canRetry
); );
}, },
folderIconName() {
if (this.model.isOpen) {
return 'chevron-down';
}
return 'chevron-right';
},
}, },
methods: { methods: {
...@@ -523,14 +531,7 @@ export default { ...@@ -523,14 +531,7 @@ export default {
@click="onClickFolder"> @click="onClickFolder">
<icon <icon
v-show="model.isOpen" :name="folderIconName"
name="chevron-down"
class="folder-icon"
aria-hidden="true"
/>
<icon
v-show="!model.isOpen"
name="chevron-right"
class="folder-icon" class="folder-icon"
aria-hidden="true" aria-hidden="true"
/> />
......
...@@ -284,7 +284,7 @@ ...@@ -284,7 +284,7 @@
.dismiss-button { .dismiss-button {
position: absolute; position: absolute;
right: 6px; right: 6px;
top: 12px; top: $gl-btn-horz-padding;
cursor: pointer; cursor: pointer;
color: $blue-300; color: $blue-300;
z-index: 1; z-index: 1;
......
...@@ -147,8 +147,8 @@ ...@@ -147,8 +147,8 @@
.ic-angle-down { .ic-angle-down {
position: absolute; position: absolute;
top: 8px; top: $gl-padding-8;
right: 8px; right: $gl-padding-8;
color: $gray-darkest; color: $gray-darkest;
} }
} }
......
...@@ -172,9 +172,6 @@ describe('Environment', () => { ...@@ -172,9 +172,6 @@ describe('Environment', () => {
expect( expect(
component.$el.querySelector('.folder-icon.ic-chevron-right').getAttribute('style'), component.$el.querySelector('.folder-icon.ic-chevron-right').getAttribute('style'),
).toContain('display: none'); ).toContain('display: none');
expect(
component.$el.querySelector('.folder-icon.ic-chevron-down').getAttribute('style'),
).not.toContain('display: none');
done(); done();
}); });
}, 0); }, 0);
...@@ -193,9 +190,6 @@ describe('Environment', () => { ...@@ -193,9 +190,6 @@ describe('Environment', () => {
expect( expect(
component.$el.querySelector('.folder-icon.ic-chevron-down').getAttribute('style'), component.$el.querySelector('.folder-icon.ic-chevron-down').getAttribute('style'),
).toContain('display: none'); ).toContain('display: none');
expect(
component.$el.querySelector('.folder-icon.ic-chevron-right').getAttribute('style'),
).not.toContain('display: none');
done(); done();
}); });
}); });
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment