Commit c8704599 authored by Kushal Pandya's avatar Kushal Pandya

Merge branch '229283-template-select-modal' into 'master'

Update template selector buttons to gl components

Closes #229283

See merge request gitlab-org/gitlab!42134
parents d3a4b526 363257ca
<script> <script>
import { mapActions, mapState, mapGetters } from 'vuex'; import { mapActions, mapState, mapGetters } from 'vuex';
import { GlModal } from '@gitlab/ui'; import { GlModal, GlButton } from '@gitlab/ui';
import { deprecatedCreateFlash as flash } from '~/flash'; import { deprecatedCreateFlash as flash } from '~/flash';
import { __, sprintf, s__ } from '~/locale'; import { __, sprintf, s__ } from '~/locale';
import { modalTypes } from '../../constants'; import { modalTypes } from '../../constants';
...@@ -9,6 +9,7 @@ import { trimPathComponents, getPathParent } from '../../utils'; ...@@ -9,6 +9,7 @@ import { trimPathComponents, getPathParent } from '../../utils';
export default { export default {
components: { components: {
GlModal, GlModal,
GlButton,
}, },
data() { data() {
return { return {
...@@ -156,13 +157,14 @@ export default { ...@@ -156,13 +157,14 @@ export default {
/> />
<ul v-if="isCreatingNewFile" class="file-templates gl-mt-3 list-inline qa-template-list"> <ul v-if="isCreatingNewFile" class="file-templates gl-mt-3 list-inline qa-template-list">
<li v-for="(template, index) in templateTypes" :key="index" class="list-inline-item"> <li v-for="(template, index) in templateTypes" :key="index" class="list-inline-item">
<button <gl-button
type="button" variant="dashed"
class="btn btn-missing p-1 pr-2 pl-2" category="secondary"
class="p-1 pr-2 pl-2"
@click="createFromTemplate(template)" @click="createFromTemplate(template)"
> >
{{ template.name }} {{ template.name }}
</button> </gl-button>
</li> </li>
</ul> </ul>
</div> </div>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment