Commit 4646e08a authored by Christie Lenneville's avatar Christie Lenneville Committed by Vitaly Slobodin

Update create label modal to gl-buttons

parent 1dd797d7
...@@ -28,21 +28,24 @@ export default { ...@@ -28,21 +28,24 @@ export default {
<template> <template>
<div class="dropdown-page-two dropdown-new-label"> <div class="dropdown-page-two dropdown-new-label">
<div class="dropdown-title"> <div
class="dropdown-title gl-display-flex gl-justify-content-space-between gl-align-items-center"
>
<gl-button <gl-button
:aria-label="__('Go back')" :aria-label="__('Go back')"
category="tertiary" category="tertiary"
class="dropdown-title-button dropdown-menu-back" class="dropdown-menu-back"
icon="arrow-left" icon="arrow-left"
size="small"
/> />
{{ headerTitle }} {{ headerTitle }}
<button <gl-button
:aria-label="__('Close')" :aria-label="__('Close')"
type="button" category="tertiary"
class="dropdown-title-button dropdown-menu-close" class="dropdown-menu-close"
> icon="close"
<i aria-hidden="true" class="fa fa-times dropdown-menu-close-icon" data-hidden="true"> </i> size="small"
</button> />
</div> </div>
<div class="dropdown-content"> <div class="dropdown-content">
<div class="dropdown-labels-error js-label-error"></div> <div class="dropdown-labels-error js-label-error"></div>
...@@ -77,12 +80,12 @@ export default { ...@@ -77,12 +80,12 @@ export default {
/> />
</div> </div>
<div class="clearfix"> <div class="clearfix">
<button type="button" class="btn btn-primary float-left js-new-label-btn disabled"> <gl-button category="secondary" class="float-left js-new-label-btn disabled">
{{ __('Create') }} {{ __('Create') }}
</button> </gl-button>
<button type="button" class="btn btn-default float-right js-cancel-label-btn"> <gl-button category="secondary" class="float-right js-cancel-label-btn">
{{ __('Cancel') }} {{ __('Cancel') }}
</button> </gl-button>
</div> </div>
</div> </div>
</div> </div>
......
...@@ -38,9 +38,7 @@ describe('DropdownCreateLabelComponent', () => { ...@@ -38,9 +38,7 @@ describe('DropdownCreateLabelComponent', () => {
}); });
it('renders `Go back` button on component header', () => { it('renders `Go back` button on component header', () => {
const backButtonEl = vm.$el.querySelector( const backButtonEl = vm.$el.querySelector('.dropdown-title .dropdown-menu-back');
'.dropdown-title button.dropdown-title-button.dropdown-menu-back',
);
expect(backButtonEl).not.toBe(null); expect(backButtonEl).not.toBe(null);
expect(backButtonEl.querySelector('[data-testid="arrow-left-icon"]')).not.toBe(null); expect(backButtonEl.querySelector('[data-testid="arrow-left-icon"]')).not.toBe(null);
...@@ -62,12 +60,9 @@ describe('DropdownCreateLabelComponent', () => { ...@@ -62,12 +60,9 @@ describe('DropdownCreateLabelComponent', () => {
}); });
it('renders `Close` button on component header', () => { it('renders `Close` button on component header', () => {
const closeButtonEl = vm.$el.querySelector( const closeButtonEl = vm.$el.querySelector('.dropdown-title .dropdown-menu-close');
'.dropdown-title button.dropdown-title-button.dropdown-menu-close',
);
expect(closeButtonEl).not.toBe(null); expect(closeButtonEl).not.toBe(null);
expect(closeButtonEl.querySelector('.fa-times.dropdown-menu-close-icon')).not.toBe(null);
}); });
it('renders `Name new label` input element', () => { it('renders `Name new label` input element', () => {
......
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