Skip to content

Commit

Permalink
Fix(NcActionButton): Add RTL support to NcActionButton component
Browse files Browse the repository at this point in the history
Signed-off-by: Faisal Alghamdi <[email protected]>
  • Loading branch information
falghamdi125 committed Nov 8, 2024
1 parent b7eeee8 commit ca9deaa
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/assets/action.scss
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
height: auto;
margin: 0;
padding: 0;
padding-right: $icon-margin;
padding-inline-end: $icon-margin;
box-sizing: border-box; // otherwise router-link overflows in Firefox

cursor: pointer;
Expand Down Expand Up @@ -75,6 +75,9 @@
.material-design-icon__svg {
vertical-align: middle;
}
body[dir=rtl] & {
transform: scaleX(-1);
}
}

// long text area
Expand Down Expand Up @@ -110,10 +113,10 @@

&__menu-icon {
// Push to the right
margin-left: auto;
margin-inline-start: auto;
// Align with right end of the button
// This is the padding-right
margin-right: calc($icon-margin * -1);
margin-inline-end: calc($icon-margin * -1);
}
}
}

0 comments on commit ca9deaa

Please sign in to comment.