<template>
  <div class="bg-card">
    <h3 class="card-title text-clip">
      <span class="title-icon" v-if="icon">
        <bg-icon :icon="icon" />
      </span>
      <span class="text-text">{{ title }}</span>
    </h3>
    <div class="card-content" ref="content">
      <slot />
    </div>
  </div>
</template>

<script>
export default {
  name: "BgCard",
  props: {
    title: {
      type: String,
      default: "",
    },
    icon: {
      type: String,
      default: "",
    },
  },
};
</script>
