Skip to content

Commit

Permalink
Fix icon alignment (#2780)
Browse files Browse the repository at this point in the history
  • Loading branch information
anambl authored Mar 17, 2023
1 parent f6466c7 commit f019d8a
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 20 deletions.
7 changes: 1 addition & 6 deletions packages/bpk-component-icon/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ import {
iconSizeSm,
iconSizeLg,
privateButtonLineHeight,
privateButtonLargeLineHeight,
} from '@skyscanner/bpk-foundations-web/tokens/base.es6';

import withAlignment from './src/withAlignment';
Expand All @@ -33,11 +32,7 @@ function withButtonAlignment(WrappedComponent) {
}

function withLargeButtonAlignment(WrappedComponent) {
return withAlignment(
WrappedComponent,
privateButtonLargeLineHeight,
iconSizeLg,
);
return withAlignment(WrappedComponent, privateButtonLineHeight, iconSizeLg);
}

export {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ exports[`BpkLoadingButton should add only bpk specific classes if className prop
>
My button 
<span
style="line-height: 1.5rem; display: inline-block; vertical-align: top;"
style="line-height: 1.5rem; display: inline-block; margin-top: 0rem; vertical-align: top;"
>
<svg
class="bpk-icon--rtl-support"
Expand Down Expand Up @@ -62,7 +62,7 @@ exports[`BpkLoadingButton should render correctly with "large" and "destructive"
>
My button 
<span
style="line-height: 1.5rem; display: inline-block; vertical-align: top;"
style="line-height: 1.5rem; display: inline-block; margin-top: 0rem; vertical-align: top;"
>
<svg
class="bpk-icon--rtl-support"
Expand All @@ -89,7 +89,7 @@ exports[`BpkLoadingButton should render correctly with "large" and "disabled" at
>
My button 
<span
style="line-height: 1.5rem; display: inline-block; vertical-align: top;"
style="line-height: 1.5rem; display: inline-block; margin-top: 0rem; vertical-align: top;"
>
<svg
class="bpk-icon--rtl-support"
Expand All @@ -115,7 +115,7 @@ exports[`BpkLoadingButton should render correctly with "large" and "featured" at
>
My button 
<span
style="line-height: 1.5rem; display: inline-block; vertical-align: top;"
style="line-height: 1.5rem; display: inline-block; margin-top: 0rem; vertical-align: top;"
>
<svg
class="bpk-icon--rtl-support"
Expand Down Expand Up @@ -145,7 +145,7 @@ exports[`BpkLoadingButton should render correctly with "large" and "iconOnly" at
Search
</span>
<span
style="line-height: 1.5rem; display: inline-block; vertical-align: top;"
style="line-height: 1.5rem; display: inline-block; margin-top: 0rem; vertical-align: top;"
>
<svg
class="bpk-icon--rtl-support"
Expand All @@ -171,7 +171,7 @@ exports[`BpkLoadingButton should render correctly with "large" and "link" attrib
>
My button 
<span
style="line-height: 1.5rem; display: inline-block; vertical-align: top;"
style="line-height: 1.5rem; display: inline-block; margin-top: 0rem; vertical-align: top;"
>
<svg
class="bpk-icon--rtl-support"
Expand All @@ -197,7 +197,7 @@ exports[`BpkLoadingButton should render correctly with "large" and "linkOnDark"
>
My button 
<span
style="line-height: 1.5rem; display: inline-block; vertical-align: top;"
style="line-height: 1.5rem; display: inline-block; margin-top: 0rem; vertical-align: top;"
>
<svg
class="bpk-icon--rtl-support"
Expand Down Expand Up @@ -295,7 +295,7 @@ exports[`BpkLoadingButton should render correctly with "large" and "loading" att
</span>
My button 
<span
style="line-height: 1.5rem; display: inline-block; vertical-align: top;"
style="line-height: 1.5rem; display: inline-block; margin-top: 0rem; vertical-align: top;"
>
<svg
class="bpk-icon--rtl-support"
Expand All @@ -321,7 +321,7 @@ exports[`BpkLoadingButton should render correctly with "large" and "primaryOnDar
>
My button 
<span
style="line-height: 1.5rem; display: inline-block; vertical-align: top;"
style="line-height: 1.5rem; display: inline-block; margin-top: 0rem; vertical-align: top;"
>
<svg
class="bpk-icon--rtl-support"
Expand All @@ -347,7 +347,7 @@ exports[`BpkLoadingButton should render correctly with "large" and "primaryOnLig
>
My button 
<span
style="line-height: 1.5rem; display: inline-block; vertical-align: top;"
style="line-height: 1.5rem; display: inline-block; margin-top: 0rem; vertical-align: top;"
>
<svg
class="bpk-icon--rtl-support"
Expand All @@ -373,7 +373,7 @@ exports[`BpkLoadingButton should render correctly with "large" and "secondary" a
>
My button 
<span
style="line-height: 1.5rem; display: inline-block; vertical-align: top;"
style="line-height: 1.5rem; display: inline-block; margin-top: 0rem; vertical-align: top;"
>
<svg
class="bpk-icon--rtl-support"
Expand All @@ -399,7 +399,7 @@ exports[`BpkLoadingButton should render correctly with "large" and "secondaryOnD
>
My button 
<span
style="line-height: 1.5rem; display: inline-block; vertical-align: top;"
style="line-height: 1.5rem; display: inline-block; margin-top: 0rem; vertical-align: top;"
>
<svg
class="bpk-icon--rtl-support"
Expand Down Expand Up @@ -699,7 +699,7 @@ exports[`BpkLoadingButton should render correctly with a "large" attribute 1`] =
>
My button 
<span
style="line-height: 1.5rem; display: inline-block; vertical-align: top;"
style="line-height: 1.5rem; display: inline-block; margin-top: 0rem; vertical-align: top;"
>
<svg
class="bpk-icon--rtl-support"
Expand Down Expand Up @@ -1037,7 +1037,7 @@ exports[`BpkLoadingButton should respect the class names entered as a string 1`]
>
My button 
<span
style="line-height: 1.5rem; display: inline-block; vertical-align: top;"
style="line-height: 1.5rem; display: inline-block; margin-top: 0rem; vertical-align: top;"
>
<svg
class="bpk-icon--rtl-support"
Expand Down

0 comments on commit f019d8a

Please sign in to comment.