-
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.
f-account-info@v0.20.0 - Added success & failed alerts to the Save bu…
…tton (#1753) * f-account-info - Added success & failed alerts attached to the Save button * f-account-info - Styling changes * Review tweak * Changed the load error title to meet figma design * Review tweak Co-authored-by: billy.oliver <billy.oliver@just-eat.com> Co-authored-by: Kevin Rodrigues <kevin.rodrigues@just-eat.com>
- Loading branch information
1 parent
2cb60f0
commit 21397e4
Showing
9 changed files
with
178 additions
and
63 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
66 changes: 66 additions & 0 deletions
66
packages/components/pages/f-account-info/src/components/Notifications.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,66 @@ | ||
<template> | ||
<div> | ||
<f-alert | ||
v-if="showSaveErrorAlert" | ||
data-test-id="account-info-error-alert" | ||
:class="[ | ||
$style['c-accountInfo-alert'], | ||
$style['c-accountInfo-inheritWidthAboveNarrow'] | ||
]" | ||
type="danger" | ||
:heading="$t('errorMessages.saving.heading')"> | ||
{{ $t(errorMessageKey) }} | ||
</f-alert> | ||
|
||
<f-alert | ||
v-if="showSuccessfulAlert" | ||
data-test-id="account-info-success-alert" | ||
:class="[ | ||
$style['c-accountInfo-alert'], | ||
$style['c-accountInfo-inheritWidthAboveNarrow'] | ||
]" | ||
type="success" | ||
:heading="$t('successMessages.saving.heading')" | ||
/> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
import FAlert from '@justeat/f-alert'; | ||
import '@justeat/f-alert/dist/f-alert.css'; | ||
export default { | ||
name: 'AccountInfoNotifications', | ||
components: { | ||
FAlert | ||
}, | ||
props: { | ||
errorMessageKey: { | ||
type: String, | ||
default: '' | ||
}, | ||
showSaveErrorAlert: { | ||
type: Boolean | ||
}, | ||
showSuccessfulAlert: { | ||
type: Boolean | ||
} | ||
} | ||
}; | ||
</script> | ||
|
||
<style lang="scss" module> | ||
.c-accountInfo-inheritWidthAboveNarrow { | ||
width: 100%; | ||
@include media('>narrow') { | ||
width: inherit; | ||
} | ||
} | ||
.c-accountInfo-alert { | ||
margin-top: spacing(f); | ||
} | ||
</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
Oops, something went wrong.