Welcome to mirror list, hosted at ThFree Co, Russian Federation.

editor_mode_switcher.vue « markdown « components « vue_shared « javascripts « assets « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 645975ca565edbfb311cc975abcda74ca2c44c4e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<script>
import { GlButton } from '@gitlab/ui';
import { __ } from '~/locale';

export default {
  components: {
    GlButton,
  },
  props: {
    value: {
      type: String,
      required: true,
    },
  },
  computed: {
    markdownEditorSelected() {
      return this.value === 'markdown';
    },
    text() {
      return this.markdownEditorSelected ? __('Switch to rich text') : __('Switch to Markdown');
    },
  },
};
</script>
<template>
  <gl-button
    class="btn btn-default btn-sm gl-button btn-default-tertiary"
    data-qa-selector="editing_mode_switcher"
    @click="$emit('input')"
    >{{ text }}</gl-button
  >
</template>