<script setup>
const props = defineProps(['min', 'row', 'stretch'])
</script>

<template>
  <div class="input-group" :class="{ min: props.min, row: props.row, stretch: props.stretch }">
    <slot />
  </div>
</template>

<style scoped>
.input-group {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-s);
}

.input-group > label {
  font-size: var(--text-s);
  font-weight: bold;
}

.input-group.min {
  width: min-content;
}

.input-group.row {
  flex-direction: column;
}

@media (min-width: 48em) {
  .input-group.row {
    flex-direction: row;
    gap: var(--spacing-l);
  }
}

.input-group.stretch {
  flex: 1;
}
</style>