ameliabooking
/
v3
/
src
/
views
/
admin
/
customize
/
settings
/
template
/
SidebarCardTemplate.vue
SidebarCardTemplate.vue
90 lines
| 1 | <template> |
| 2 | <div class="am-cs-block__wrapper"> |
| 3 | <div |
| 4 | v-if="backBtnVisibility || headingIcon || headingText" |
| 5 | class="am-cs-block__header" |
| 6 | > |
| 7 | <AmButton |
| 8 | v-if="backBtnVisibility" |
| 9 | :icon="IconArrowLeft" |
| 10 | :icon-only="true" |
| 11 | class="am-cs-back-btn" |
| 12 | size="micro" |
| 13 | type="plain" |
| 14 | category="secondary" |
| 15 | @click="() => emits('click')" |
| 16 | ></AmButton> |
| 17 | <template v-if="headingIcon || Object.keys(headingIcon).length"> |
| 18 | {{ headingIcon }} |
| 19 | </template> |
| 20 | <span> |
| 21 | {{ headingText }} |
| 22 | </span> |
| 23 | </div> |
| 24 | <div class="am-cs-block__content"> |
| 25 | <slot></slot> |
| 26 | </div> |
| 27 | </div> |
| 28 | </template> |
| 29 | |
| 30 | <script setup> |
| 31 | import AmButton from "../../../../_components/button/AmButton.vue"; |
| 32 | import IconArrowLeft from "../../../../_components/icons/IconArrowLeft.vue"; |
| 33 | |
| 34 | defineProps({ |
| 35 | backBtnVisibility: { |
| 36 | type: Boolean, |
| 37 | default: true, |
| 38 | }, |
| 39 | headingIcon: { |
| 40 | type: [String, Object], |
| 41 | default: '' |
| 42 | }, |
| 43 | headingText: { |
| 44 | type: String, |
| 45 | default: '' |
| 46 | } |
| 47 | }) |
| 48 | |
| 49 | const emits = defineEmits(['click']) |
| 50 | </script> |
| 51 | |
| 52 | <script> |
| 53 | export default { |
| 54 | name: "SidebarCardTemplate" |
| 55 | } |
| 56 | </script> |
| 57 | |
| 58 | <style lang="scss"> |
| 59 | @mixin am-cs-block { |
| 60 | .am-cs { |
| 61 | &-block { |
| 62 | &__wrapper {} |
| 63 | &__header { |
| 64 | display: flex; |
| 65 | align-items: center; |
| 66 | font-size: 18px; |
| 67 | font-style: normal; |
| 68 | font-weight: 500; |
| 69 | line-height: 1.55555; |
| 70 | color: $shade-800; |
| 71 | padding: 16px; |
| 72 | |
| 73 | & > span { |
| 74 | display: inline-block; |
| 75 | margin: 0 0 0 6px; |
| 76 | } |
| 77 | } |
| 78 | } |
| 79 | |
| 80 | &-back-btn { |
| 81 | margin-right: 8px; |
| 82 | } |
| 83 | } |
| 84 | } |
| 85 | |
| 86 | // admin |
| 87 | #amelia-app-backend-new { |
| 88 | @include am-cs-block; |
| 89 | } |
| 90 | </style> |