Skip to content

Commit

Permalink
PATCH: fix(icons): fix icon rotation
Browse files Browse the repository at this point in the history
  • Loading branch information
NicolasRichel committed Jan 6, 2022
1 parent 5b4d5f1 commit b46a05e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 34 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
width="21px"
height="21px"
>
<BIMDataIcon name="chevron" size="xxxs" />
<BIMDataIcon name="chevron" size="xxxs" :rotate="iconRotation" />
</BIMDataButton>
<slot name="contentAfterBtn"></slot>
</div>
Expand Down Expand Up @@ -114,6 +114,9 @@ export default {
"min-height": `${this.height}`,
};
},
iconRotation() {
return this.displayed ? (this.directionClass === "up" ? -90 : 90) : 0;
},
},
methods: {
onHeaderClick() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,6 @@
background-color: var(--color-white);
border: 1px solid transparent;
box-shadow: var(--box-shadow);
.bimdata-btn {
svg {
transform: rotate(90deg);
}
}
}

&.disabled {
Expand All @@ -45,31 +40,6 @@
}
}

&[direction*="up"] {
.bimdata-dropdown-list__content {
&.active {
.bimdata-btn {
svg {
transform: rotate(-90deg);
}
}
}
}
}

&[direction*="right"],
&[direction*="left"] {
.bimdata-dropdown-list__content {
&.active {
.bimdata-btn {
svg {
transform: none;
}
}
}
}
}

.bimdata-paginated-list {
&__elements {
font-size: 11px;
Expand Down
4 changes: 1 addition & 3 deletions src/BIMDataComponents/BIMDataIcon/BIMDataIcon.vue
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,8 @@ export default {
height: `${pixelSize}px`,
minHeight: `${pixelSize}px`,
margin: `${this.margin}`,
transform: `rotate(${this.rotate}deg)`,
};
if (this.rotation > 0) {
style.transform = `rotate(${this.rotate}deg)`;
}
return style;
},
},
Expand Down

0 comments on commit b46a05e

Please sign in to comment.