-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[email protected] - Add address alert (#2448)
* [email protected] - Add address alert * [email protected] - Add new prop
- Loading branch information
1 parent
f0b2aa8
commit d67695d
Showing
7 changed files
with
94 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
46 changes: 46 additions & 0 deletions
46
packages/components/pages/f-checkout/src/components/AddressAlert.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
<template> | ||
<div :class="$style['c-checkout-address-alert-container']"> | ||
<alert-component | ||
type="info" | ||
:heading="$t('warningMessages.addressAlert.title')" | ||
:class="$style['c-checkout-address-alert']"> | ||
{{ $t(`warningMessages.addressAlert.body`) }} | ||
</alert-component> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
import AlertComponent from '@justeat/f-alert'; | ||
import '@justeat/f-alert/dist/f-alert.css'; | ||
export default { | ||
name: 'AddressAlert', | ||
components: { | ||
AlertComponent | ||
} | ||
}; | ||
</script> | ||
|
||
<style lang="scss" module> | ||
@use '@justeat/fozzie/src/scss/fozzie' as f; | ||
.c-checkout-address-alert-container { | ||
width: 100%; | ||
display: flex; | ||
justify-content: center; | ||
} | ||
.c-checkout-address-alert { | ||
width: 100%; | ||
max-width: 470px; | ||
margin: f.spacing(e) f.spacing(f); | ||
margin-bottom: -12px; | ||
@include f.media('<narrow') { | ||
margin-bottom: 0; // Top margin has disappeared so no need to reduce it | ||
} | ||
@include f.media('>=narrowMid') { | ||
margin: f.spacing(g) auto calc(f.spacing(c) - f.spacing(g)); // Eat 28px from f-card's top margin to reduce it to 12px | ||
} | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters