-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
-[x] Completed replacing text with component for activity elements
- Loading branch information
1 parent
7bfad9f
commit 422606c
Showing
23 changed files
with
1,905 additions
and
654 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
Large diffs are not rendered by default.
Oops, something went wrong.
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,39 @@ | ||
<template> | ||
<template v-if="condition"> | ||
{{ successText }} | ||
</template> | ||
<template v-else> | ||
<!--Send failureText as prop, or empty string if failureText is empty.--> | ||
<template v-if="showFailureTextAsPlainText"> | ||
{{ failureText }} | ||
</template> | ||
<template v-else> | ||
<MissingDataItem :item="failureText || ''" /> | ||
</template> | ||
</template> | ||
</template> | ||
<script setup lang="ts"> | ||
import { defineProps } from 'vue'; | ||
import MissingDataItem from 'Components/MissingDataItem.vue'; | ||
// eslint-disable-next-line @typescript-eslint/no-unused-vars | ||
const props = defineProps({ | ||
condition: { | ||
type: Object as () => unknown, | ||
required: true, | ||
}, | ||
successText: { | ||
type: [String, Number], | ||
required: true, | ||
}, | ||
// eslint-disable-next-line vue/require-default-prop | ||
failureText: { | ||
type: String, | ||
required: false, | ||
}, | ||
showFailureTextAsPlainText: { | ||
type: Boolean, | ||
required: false, | ||
}, | ||
}); | ||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<template> | ||
<div class="inline-flex items-center align-middle"> | ||
<svg-vue icon="warning-orange" /> | ||
<span class="missing-text">{{ item }} {{ missing }}</span> | ||
</div> | ||
</template> | ||
<script setup lang="ts"> | ||
import { capitalize, defineProps } from 'vue'; | ||
const props = defineProps({ | ||
// eslint-disable-next-line vue/require-default-prop | ||
item: { | ||
type: String, | ||
required: false, | ||
}, | ||
}); | ||
let missing = 'missing'; | ||
if (!props.item) { | ||
missing = capitalize(missing); | ||
} | ||
</script> | ||
<style> | ||
.missing-text { | ||
font-family: Arial, sans-serif; | ||
font-size: 12px; | ||
font-weight: 400; | ||
line-height: 20px; | ||
letter-spacing: -0.02em; | ||
text-align: left; | ||
@apply px-1 text-salmon-50; | ||
} | ||
</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
Oops, something went wrong.