Skip to content

Commit

Permalink
[CHUX-690] Make metroline footer cta mobile friendly (#2005)
Browse files Browse the repository at this point in the history
* CHUX-690:feat:remove buttons 256px limit and make metroline footer cta expand fully on mobile

* CHUX-690:chore:identation

* CHUX-690:feat:add z index to panel

* CHUX-690:fix:bem

* 2.8.16
  • Loading branch information
stavros-tomas committed Jul 10, 2024
1 parent 7b9d34c commit fea75d3
Show file tree
Hide file tree
Showing 9 changed files with 34 additions and 30 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ebury/chameleon-components",
"version": "2.8.15",
"version": "2.8.16",
"main": "src/main.ts",
"sideEffects": false,
"author": "Ebury Team (http://labs.ebury.rocks/)",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,12 @@ function complete() {
}
&__footer-cta {
@apply tw-ml-auto tw-mr-0;
@apply tw-w-full;
@screen md {
@apply tw-w-auto;
@apply tw-ml-auto tw-mr-0;
}
}
}
</style>
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ exports[`EcMobileHeader > should render properly 1`] = `
type="button"
>
<svg
class="ec-icon ec-mobile-header__menu__icon"
class="ec-icon ec-mobile-header__menu-icon"
height="24"
width="24"
>
Expand Down
4 changes: 2 additions & 2 deletions src/components/ec-mobile-header/ec-mobile-header.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
@click="emit('open-mobile-menu')"
>
<ec-icon
class="ec-mobile-header__menu__icon"
class="ec-mobile-header__menu-icon"
:name="IconName.SIMPLE_MENU"
:size="24"
/>
Expand Down Expand Up @@ -44,7 +44,7 @@ const emit = defineEmits<{
@apply tw-border-0 tw-p-0;
@apply tw-bg-transparent;
&__icon {
&-icon {
@apply tw-fill-key-4;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

exports[`EcNavigation > mobile navigation > should close the mobile navigation when the close menu button is clicked > after 1`] = `
<div
class="ec-navigation__mobile-header__container"
class="ec-navigation__mobile-header-container"
>
<header
class="ec-mobile-header"
Expand All @@ -14,8 +14,8 @@ exports[`EcNavigation > mobile navigation > should close the mobile navigation w
<img
alt="Test Brand"
class="ec-navigation__mobile-header__logo"
data-test="ec-navigation__mobile-header__logo"
class="ec-navigation__mobile-header-logo"
data-test="ec-navigation__mobile-header-logo"
src="/img/my-brand.png"
/>
Expand All @@ -26,7 +26,7 @@ exports[`EcNavigation > mobile navigation > should close the mobile navigation w
type="button"
>
<svg
class="ec-icon ec-mobile-header__menu__icon"
class="ec-icon ec-mobile-header__menu-icon"
height="24"
width="24"
>
Expand Down Expand Up @@ -92,7 +92,7 @@ exports[`EcNavigation > mobile navigation > should close the mobile navigation w

exports[`EcNavigation > mobile navigation > should close the mobile navigation when the slot \`onNavigationLinkClicked\` binding is triggered > after 1`] = `
<div
class="ec-navigation__mobile-header__container"
class="ec-navigation__mobile-header-container"
>
<header
class="ec-mobile-header"
Expand All @@ -104,8 +104,8 @@ exports[`EcNavigation > mobile navigation > should close the mobile navigation w
<img
alt="Test Brand"
class="ec-navigation__mobile-header__logo"
data-test="ec-navigation__mobile-header__logo"
class="ec-navigation__mobile-header-logo"
data-test="ec-navigation__mobile-header-logo"
src="/img/my-brand.png"
/>
Expand All @@ -116,7 +116,7 @@ exports[`EcNavigation > mobile navigation > should close the mobile navigation w
type="button"
>
<svg
class="ec-icon ec-mobile-header__menu__icon"
class="ec-icon ec-mobile-header__menu-icon"
height="24"
width="24"
>
Expand Down Expand Up @@ -185,7 +185,7 @@ exports[`EcNavigation > mobile navigation > should close the mobile navigation w

exports[`EcNavigation > mobile navigation > should render mobile header if "isResponsive" prop is true 1`] = `
<div
class="ec-navigation__mobile-header__container"
class="ec-navigation__mobile-header-container"
>
<header
class="ec-mobile-header"
Expand All @@ -197,8 +197,8 @@ exports[`EcNavigation > mobile navigation > should render mobile header if "isRe
<img
alt="Test Brand"
class="ec-navigation__mobile-header__logo"
data-test="ec-navigation__mobile-header__logo"
class="ec-navigation__mobile-header-logo"
data-test="ec-navigation__mobile-header-logo"
src="/img/my-brand.png"
/>
Expand All @@ -209,7 +209,7 @@ exports[`EcNavigation > mobile navigation > should render mobile header if "isRe
type="button"
>
<svg
class="ec-icon ec-mobile-header__menu__icon"
class="ec-icon ec-mobile-header__menu-icon"
height="24"
width="24"
>
Expand Down Expand Up @@ -275,7 +275,7 @@ exports[`EcNavigation > mobile navigation > should show render the mobile naviga

exports[`EcNavigation > mobile navigation > should show render the mobile navigation when the mobile header menu button is clicked > before 1`] = `
<div
class="ec-navigation__mobile-header__container"
class="ec-navigation__mobile-header-container"
>
<header
class="ec-mobile-header"
Expand All @@ -287,8 +287,8 @@ exports[`EcNavigation > mobile navigation > should show render the mobile naviga
<img
alt="Test Brand"
class="ec-navigation__mobile-header__logo"
data-test="ec-navigation__mobile-header__logo"
class="ec-navigation__mobile-header-logo"
data-test="ec-navigation__mobile-header-logo"
src="/img/my-brand.png"
/>
Expand All @@ -299,7 +299,7 @@ exports[`EcNavigation > mobile navigation > should show render the mobile naviga
type="button"
>
<svg
class="ec-icon ec-mobile-header__menu__icon"
class="ec-icon ec-mobile-header__menu-icon"
height="24"
width="24"
>
Expand Down
10 changes: 5 additions & 5 deletions src/components/ec-navigation/ec-navigation.vue
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
<template>
<div
v-if="isResponsive && !isMobileMenuOpen"
class="ec-navigation__mobile-header__container"
class="ec-navigation__mobile-header-container"
>
<ec-mobile-header
@open-mobile-menu="isMobileMenuOpen = true"
>
<template #logo>
<img
class="ec-navigation__mobile-header__logo"
class="ec-navigation__mobile-header-logo"
:src="branding.logo"
:alt="branding.name"
data-test="ec-navigation__mobile-header__logo"
data-test="ec-navigation__mobile-header-logo"
>
</template>
</ec-mobile-header>
Expand Down Expand Up @@ -231,11 +231,11 @@ function onNavigationLinkClicked() {
}
&__mobile-header {
&__container {
&-container {
padding-bottom: 68px;
}
&__logo {
&-logo {
@apply tw-h-36;
}
}
Expand Down
1 change: 1 addition & 0 deletions src/components/ec-panel/ec-panel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ function closePanel() {
max-width: var(--ec-side-panel-max-width);
@apply tw-w-full;
@apply tw-z-navigation;
@apply tw-absolute tw-right-0 tw-top-0;
&__fixed-container {
Expand Down
2 changes: 0 additions & 2 deletions src/styles/components/ec-btn/ec-btn.css
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
@apply tw-whitespace-nowrap tw-overflow-hidden;
@apply tw-transition-colors tw-duration-150 tw-ease-out;

max-width: 256px;

&:hover {
@apply tw-no-underline;
}
Expand Down

0 comments on commit fea75d3

Please sign in to comment.