// This component can be stubbed for snapshot testing so that
// there are no loading side effect classes added to the wrapping element.
<template>
  <component
    :is="tag"
    v-loading="loading"
    :element-loading-text="loadingText"
    v-bind="$attrs"
    v-on="$listeners">
    <slot></slot>
  </component>
</template>

<script>
export default {
  name: 'ElLoadingWrapper',
  props: {
    tag: { type: String, default: 'div' },
    loading: { type: Boolean, required: true },
    loadingText: { type: String, default: '' }
  }
};
</script>
