<template>
  <label class="RTextarea">
    <span class="RTextarea-Label">{{ label }}</span>
    <textarea
      class="RTextarea-Textarea"
      :value="value"
      :placeholder="placeholder"
      :disabled="disable"
      @input="$emit('input', $event.target.value)"
    />
  </label>
</template>

<script lang="ts">
import { Component, Prop, Vue } from 'vue-property-decorator';

@Component({})
export default class RTextarea extends Vue {
  @Prop()
  label: string;

  @Prop()
  value: string;

  @Prop()
  placeholder: string;

  @Prop({ default: false })
  disable: boolean;
}
</script>

<style lang="scss" scoped>
.RTextarea {
  display: flex;
  flex-direction: column;
  &-Label {
    font-family: 'Golos Text', sans-serif;
    font-style: normal;
    font-weight: 600;
    font-size: 12px;
    line-height: 16px;
    color: rgba(2, 12, 18, 0.58);
    margin-bottom: 4px;
  }
  &-Textarea {
    background: #e5edf5;
    border-radius: 4px 4px 0 0;
    background-blend-mode: multiply;
    border: none;
    border-bottom: 1px solid rgba(1, 72, 116, 0.18);
    padding: 8px;
    box-sizing: border-box;
    transition: 0.1s;
    min-height: 40px;
    min-width: 100%;
    max-width: 100%;
    &:focus {
      transition: 0.1s;
      outline: none;
      background-color: white;
      box-shadow: inset 0 0 2px rgba(15, 104, 160, 0.87);
      border-color: #1487cf;
    }
  }
}
</style>
