Commit caa4cf65 authored by Phil Hughes's avatar Phil Hughes

Merge branch 'kp-replace-button-with-gl-button' into 'master'

Use 'GlButton' in place of button within Epic app

See merge request gitlab-org/gitlab-ee!9372
parents cbcd3cb9 9e855e52
<script> <script>
import { mapState, mapActions } from 'vuex'; import { mapState, mapActions } from 'vuex';
import { GlButton } from '@gitlab/ui';
import { __ } from '~/locale'; import { __ } from '~/locale';
import LoadingButton from '~/vue_shared/components/loading_button.vue'; import LoadingButton from '~/vue_shared/components/loading_button.vue';
export default { export default {
components: { components: {
GlButton,
LoadingButton, LoadingButton,
}, },
props: { props: {
...@@ -45,14 +47,14 @@ export default { ...@@ -45,14 +47,14 @@ export default {
<template> <template>
<div class="dropdown epic-create-dropdown"> <div class="dropdown epic-create-dropdown">
<button <gl-button
class="btn btn-success qa-new-epic-button" variant="success"
type="button" class="qa-new-epic-button"
data-toggle="dropdown" data-toggle="dropdown"
@click="focusInput" @click="focusInput"
> >
{{ __('New epic') }} {{ __('New epic') }}
</button> </gl-button>
<div :class="{ 'dropdown-menu-right': alignRight }" class="dropdown-menu"> <div :class="{ 'dropdown-menu-right': alignRight }" class="dropdown-menu">
<input <input
ref="epicTitleInput" ref="epicTitleInput"
......
<script> <script>
import { mapState, mapGetters, mapActions } from 'vuex'; import { mapState, mapGetters, mapActions } from 'vuex';
import { GlButton } from '@gitlab/ui';
import { __ } from '~/locale'; import { __ } from '~/locale';
...@@ -18,6 +19,7 @@ export default { ...@@ -18,6 +19,7 @@ export default {
}, },
components: { components: {
Icon, Icon,
GlButton,
LoadingButton, LoadingButton,
UserAvatarLink, UserAvatarLink,
TimeagoTooltip, TimeagoTooltip,
...@@ -104,14 +106,15 @@ export default { ...@@ -104,14 +106,15 @@ export default {
@click="toggleEpicStatus(isEpicOpen)" @click="toggleEpicStatus(isEpicOpen)"
/> />
</div> </div>
<button <gl-button
:aria-label="__('Toggle sidebar')" :aria-label="__('Toggle sidebar')"
class="btn btn-default float-right d-block d-sm-none variant="secondary"
class="float-right d-block d-sm-none
gutter-toggle issuable-gutter-toggle js-sidebar-toggle" gutter-toggle issuable-gutter-toggle js-sidebar-toggle"
type="button" type="button"
@click="toggleSidebar({ sidebarCollapsed })" @click="toggleSidebar({ sidebarCollapsed })"
> >
<i class="fa fa-angle-double-left"></i> <i class="fa fa-angle-double-left"></i>
</button> </gl-button>
</div> </div>
</template> </template>
<script> <script>
import _ from 'underscore'; import _ from 'underscore';
import { GlLoadingIcon } from '@gitlab/ui'; import { GlLoadingIcon, GlButton } from '@gitlab/ui';
import { __, s__ } from '~/locale'; import { __, s__ } from '~/locale';
import { dateInWords } from '~/lib/utils/datetime_utility'; import { dateInWords } from '~/lib/utils/datetime_utility';
...@@ -26,6 +26,7 @@ export default { ...@@ -26,6 +26,7 @@ export default {
CollapsedCalendarIcon, CollapsedCalendarIcon,
ToggleSidebar, ToggleSidebar,
GlLoadingIcon, GlLoadingIcon,
GlButton,
}, },
props: { props: {
sidebarCollapsed: { sidebarCollapsed: {
...@@ -200,14 +201,14 @@ export default { ...@@ -200,14 +201,14 @@ export default {
css-classes="help-icon append-right-5" css-classes="help-icon append-right-5"
tab-index="0" tab-index="0"
/> />
<button <gl-button
v-show="canUpdate && !editing" v-show="canUpdate && !editing"
type="button" variant="link"
class="btn-blank btn-link btn-primary-hover-link btn-sidebar-action" class="btn-sidebar-action"
@click="toggleDatePicker" @click="toggleDatePicker"
> >
{{ __('Edit') }} {{ __('Edit') }}
</button> </gl-button>
<toggle-sidebar <toggle-sidebar
v-if="showToggleSidebar" v-if="showToggleSidebar"
:collapsed="sidebarCollapsed" :collapsed="sidebarCollapsed"
...@@ -246,14 +247,14 @@ export default { ...@@ -246,14 +247,14 @@ export default {
tab-index="0" tab-index="0"
/> />
<span v-if="selectedAndEditable" class="no-value"> <span v-if="selectedAndEditable" class="no-value">
- &nbsp;&ndash;
<button <gl-button
type="button" variant="link"
class="btn-blank btn-link btn-default-hover-link" class="btn-sidebar-date-remove"
@click="newDateSelected(null)" @click="newDateSelected(null)"
> >
{{ __('remove') }} {{ __('remove') }}
</button> </gl-button>
</span> </span>
</template> </template>
<span v-else class="no-value"> {{ __('None') }} </span> <span v-else class="no-value"> {{ __('None') }} </span>
......
...@@ -11,6 +11,15 @@ ...@@ -11,6 +11,15 @@
color: $gl-text-color-secondary; color: $gl-text-color-secondary;
} }
.btn-sidebar-action {
line-height: $gl-font-size;
}
.btn-sidebar-date-remove {
height: $gl-font-size;
line-height: $gl-btn-horz-padding;
}
.date-warning-icon { .date-warning-icon {
color: $orange-500; color: $orange-500;
margin-top: -1px; margin-top: -1px;
......
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