This repository has been archived by the owner on Oct 31, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 103
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(default-theme): created and styled error list component
* feat(default-theme): created and styled error list component
- Loading branch information
Showing
9 changed files
with
123 additions
and
98 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
<template> | ||
<div v-if="list" class="errors-list-component"> | ||
<SwAlert :message="$t('Encountered problems:')" type="danger" /> | ||
|
||
<ul class="list"> | ||
<li v-for="message in list" :key="message" class="item">{{ message }}</li> | ||
</ul> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
import SwAlert from "@shopware-pwa/default-theme/components/atoms/SwAlert" | ||
export default { | ||
name: "SwErrorsList", | ||
components: { SwAlert }, | ||
props: { | ||
list: { | ||
type: Array, | ||
default: [], | ||
}, | ||
}, | ||
setup(props, { root }) { | ||
return {} | ||
}, | ||
} | ||
</script> | ||
|
||
<style lang="scss" scoped> | ||
.errors-list-component { | ||
color: var(--_c-red-primary); | ||
font-size: var(--font-sm); | ||
.list { | ||
margin-top: var(--spacer-xs); | ||
padding-left: var(--spacer-xs); | ||
.item { | ||
list-style: inside; | ||
} | ||
} | ||
} | ||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<template> | ||
<SfAlert :message="message" :type="type" /> | ||
</template> | ||
|
||
<script> | ||
import { SfAlert } from "@storefront-ui/vue" | ||
export default { | ||
name: "SwAlert", | ||
components: { | ||
SfAlert, | ||
}, | ||
props: { | ||
message: { | ||
type: String, | ||
default: "", | ||
}, | ||
type: { | ||
type: String, | ||
default: "secondary", | ||
}, | ||
}, | ||
} | ||
</script> |
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
Oops, something went wrong.
d0e3b42
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs: