Initial commit
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
<template>
|
||||
<div class="empty-state">
|
||||
<div class="empty-state__icon">
|
||||
<slot />
|
||||
</div>
|
||||
|
||||
<h6 v-html="text" class="empty-state__text empty-state__title text is-caption is-txtSoftGrey"></h6>
|
||||
<p v-html="subtitle" v-if="subtitle" class="empty-state__text text is-caption is-txtSoftGrey"></p>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'EmptyState',
|
||||
props: {
|
||||
text: String,
|
||||
subtitle: String
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
@import 'new-dashboard/styles/variables';
|
||||
|
||||
.empty-state {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.empty-state__icon {
|
||||
margin-bottom: 24px;
|
||||
}
|
||||
|
||||
.empty-state__text {
|
||||
margin: 0 auto;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.empty-state__title {
|
||||
max-width: 480px;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,66 @@
|
||||
<template>
|
||||
<div class="initial-state">
|
||||
<div class="initial-state-icon">
|
||||
<slot name="icon"></slot>
|
||||
</div>
|
||||
<div class="initial-state-text">
|
||||
<h6 class="title is-medium is-txtGrey initial-state-title">{{title}}</h6>
|
||||
<slot name="description"></slot>
|
||||
</div>
|
||||
<div class="action-button">
|
||||
<slot name="actionButton"></slot>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'InitialState',
|
||||
props: {
|
||||
title: String
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
@import 'new-dashboard/styles/variables';
|
||||
|
||||
.initial-state {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
padding: 36px;
|
||||
border: 2px dashed $border-color--dark;
|
||||
border-radius: 2px;
|
||||
}
|
||||
|
||||
.initial-state-title {
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
|
||||
.initial-state-icon {
|
||||
margin-right: 36px;
|
||||
|
||||
@media (max-width: $layout-tablet) {
|
||||
margin-bottom: 16px;
|
||||
|
||||
img {
|
||||
width: 32px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.initial-state-text {
|
||||
max-width: 480px;
|
||||
}
|
||||
|
||||
.action-button {
|
||||
margin-left: auto;
|
||||
|
||||
@media (max-width: $layout-tablet) {
|
||||
width: 100%;
|
||||
margin-top: 16px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,41 @@
|
||||
<template>
|
||||
<div class="loading-state">
|
||||
<div class="loading-state-icon">
|
||||
<img svg-inline src="../../assets/icons/common/loading.svg" class="loading-state__svg"/>
|
||||
</div>
|
||||
|
||||
<h6 class="loading-state-text text is-caption is-txtSoftGrey">{{text}}</h6>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'LoadingState',
|
||||
props: {
|
||||
text: String
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
@import 'new-dashboard/styles/variables';
|
||||
|
||||
.loading-state {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.loading-state-icon {
|
||||
margin-bottom: 24px;
|
||||
}
|
||||
|
||||
.loading-state__svg {
|
||||
width: 48px;
|
||||
height: 48px;
|
||||
}
|
||||
|
||||
.loading-state-text {
|
||||
max-width: 480px;
|
||||
margin: 0 auto;
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user