diff options
Diffstat (limited to 'src/client/components/form/info.vue')
| -rw-r--r-- | src/client/components/form/info.vue | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/src/client/components/form/info.vue b/src/client/components/form/info.vue new file mode 100644 index 0000000000..a9224c7e65 --- /dev/null +++ b/src/client/components/form/info.vue @@ -0,0 +1,49 @@ +<template> +<div class="fzenkabp _formItem"> + <div class="_formPanel" :class="{ warn }"> + <i v-if="warn"><Fa :icon="faExclamationTriangle"/></i> + <i v-else><Fa :icon="faInfoCircle"/></i> + <slot></slot> + </div> +</div> +</template> + +<script lang="ts"> +import { defineComponent } from 'vue'; +import { faInfoCircle, faExclamationTriangle } from '@fortawesome/free-solid-svg-icons'; + +export default defineComponent({ + props: { + warn: { + type: Boolean, + required: false, + default: false + }, + }, + data() { + return { + faInfoCircle, faExclamationTriangle + }; + } +}); +</script> + +<style lang="scss" scoped> +.fzenkabp { + > div { + padding: 14px 16px; + font-size: 90%; + background: var(--infoBg); + color: var(--infoFg); + + &.warn { + background: var(--infoWarnBg); + color: var(--infoWarnFg); + } + + > i { + margin-right: 4px; + } + } +} +</style> |