<template>
  <div v-if="show" class="title">
    <p>
      <i class="el-icon-warning"></i>
      {{ title }}</p>
  </div>
</template>

<script>
export default {
  name: 'Tip',
  props: {
    title: {
      type: String,
      default: ''
    },
    show: {
      type: Boolean,
      default: true
    }
  }
}
</script>

<style lang="scss" scoped>
.title {
  color: #E6A23C;
  background: rgb(253, 246, 236);
  border-radius: 2px;
  padding: 4px 8px;
  width: 100%;
  text-align: left;

  p {
    margin: 0;
    padding-left: 0;
    white-space: pre-line;
    font-size: 14px;
    line-height: 24px;
    text-align: left;
  }
}
</style>
