<script lang='ts' setup>
defineProps<{ text?: string }>();
</script>

<template>
  <div class="divider ion-margin-vertical" v-bind="$attrs">
    <span v-if="text">{{ text }}</span>
  </div>
</template>

<style scoped>
.divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 20px 0;
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  border-bottom: 1px solid var(--ion-text-color-step-900);
}

.divider span {
  padding: 0 10px;
  color: var(--ion-color-medium);
  font-size: 14px;
}
</style>
