summaryrefslogtreecommitdiff
path: root/docs/.vuepress/components/app-imports/StatusIcon.vue
diff options
context:
space:
mode:
authorDerick Montague <derick.montague@ibm.com>2020-10-09 19:17:48 +0300
committerDerick Montague <derick.montague@ibm.com>2020-10-20 18:59:54 +0300
commitcaaf7baff0b5995ef6c8fef213f1ec7af34ca911 (patch)
tree07ec4ee03a9a2c594d4914ca853d97573aa06f50 /docs/.vuepress/components/app-imports/StatusIcon.vue
parent0a5b9c6dcd063144896dbdc42f24c681b8b9267c (diff)
downloadwebui-vue-caaf7baff0b5995ef6c8fef213f1ec7af34ca911.tar.xz
Fix documentation render bug
Using the i18n module in the BVToastMixin file caused an issue with VuePress that resulted in the static files not being created and the documentation rendering as a blank page. - Removed the import of the BVToastMixin - Copied BVToastMixin to docs components and removed i18n - Copied the StatusIcon to docs components to so icons will render with the correct fill color in the toast notifications GitHub Issue: https://github.com/openbmc/webui-vue/issues/40 Signed-off-by: Derick Montague <derick.montague@ibm.com> Change-Id: Ie479df17d529ad2803c41e7442801e13601a0a02
Diffstat (limited to 'docs/.vuepress/components/app-imports/StatusIcon.vue')
-rw-r--r--docs/.vuepress/components/app-imports/StatusIcon.vue61
1 files changed, 61 insertions, 0 deletions
diff --git a/docs/.vuepress/components/app-imports/StatusIcon.vue b/docs/.vuepress/components/app-imports/StatusIcon.vue
new file mode 100644
index 00000000..954e4775
--- /dev/null
+++ b/docs/.vuepress/components/app-imports/StatusIcon.vue
@@ -0,0 +1,61 @@
+<template>
+ <span :class="['status-icon', status]">
+ <icon-info v-if="status === 'info'" />
+ <icon-success v-else-if="status === 'success'" />
+ <icon-warning v-else-if="status === 'warning'" />
+ <icon-danger v-else-if="status === 'danger'" />
+ <icon-secondary v-else />
+ </span>
+</template>
+
+<script>
+import IconInfo from '@carbon/icons-vue/es/information--filled/20';
+import IconCheckmark from '@carbon/icons-vue/es/checkmark--filled/20';
+import IconWarning from '@carbon/icons-vue/es/warning--filled/20';
+import IconError from '@carbon/icons-vue/es/error--filled/20';
+import IconMisuse from '@carbon/icons-vue/es/misuse/20';
+
+export default {
+ name: 'StatusIcon',
+ components: {
+ IconInfo: IconInfo,
+ iconSuccess: IconCheckmark,
+ iconDanger: IconMisuse,
+ iconSecondary: IconError,
+ iconWarning: IconWarning
+ },
+ props: {
+ status: {
+ type: String,
+ default: ''
+ }
+ }
+};
+</script>
+
+<style lang="scss" scoped>
+@import "src/assets/styles/bmc/helpers";
+@import "src/assets/styles/bootstrap/helpers";
+.status-icon {
+ vertical-align: text-bottom;
+ &.info {
+ fill: theme-color('info');
+ }
+ &.success {
+ fill: theme-color('success');
+ }
+ &.danger {
+ fill: theme-color('danger');
+ }
+ &.secondary {
+ fill: gray('600');
+
+ svg {
+ transform: rotate(-45deg);
+ }
+ }
+ &.warning {
+ fill: theme-color('warning');
+ }
+}
+</style>