Commit 401b847a authored by Clement Ho's avatar Clement Ho

Merge branch 'jivl-glui-button' into 'master'

Add gl-button from gitlab-ui

See merge request gitlab-org/gitlab-ce!21941
parents 265c039b bc945984
<script> <script>
import $ from 'jquery'; import $ from 'jquery';
import { Button } from '@gitlab-org/gitlab-ui';
import eventHub from '../eventhub'; import eventHub from '../eventhub';
import ProjectSelect from './project_select.vue'; import ProjectSelect from './project_select.vue';
import ListIssue from '../models/issue'; import ListIssue from '../models/issue';
...@@ -10,6 +11,7 @@ export default { ...@@ -10,6 +11,7 @@ export default {
name: 'BoardNewIssue', name: 'BoardNewIssue',
components: { components: {
ProjectSelect, ProjectSelect,
'gl-button': Button,
}, },
props: { props: {
groupId: { groupId: {
...@@ -123,21 +125,23 @@ export default { ...@@ -123,21 +125,23 @@ export default {
:group-id="groupId" :group-id="groupId"
/> />
<div class="clearfix prepend-top-10"> <div class="clearfix prepend-top-10">
<button <gl-button
ref="submit-button" ref="submit-button"
:disabled="disabled" :disabled="disabled"
class="btn btn-success float-left" class="float-left"
variant="success"
type="submit" type="submit"
> >
Submit issue Submit issue
</button> </gl-button>
<button <gl-button
class="btn btn-default float-right" class="float-right"
type="button" type="button"
variant="default"
@click="cancel" @click="cancel"
> >
Cancel Cancel
</button> </gl-button>
</div> </div>
</form> </form>
</div> </div>
......
...@@ -2,12 +2,14 @@ ...@@ -2,12 +2,14 @@
/** /**
* Renders the Monitoring (Metrics) link in environments table. * Renders the Monitoring (Metrics) link in environments table.
*/ */
import { Button } from '@gitlab-org/gitlab-ui';
import Icon from '~/vue_shared/components/icon.vue'; import Icon from '~/vue_shared/components/icon.vue';
import tooltip from '../../vue_shared/directives/tooltip'; import tooltip from '../../vue_shared/directives/tooltip';
export default { export default {
components: { components: {
Icon, Icon,
'gl-button': Button,
}, },
directives: { directives: {
tooltip, tooltip,
...@@ -26,15 +28,16 @@ export default { ...@@ -26,15 +28,16 @@ export default {
}; };
</script> </script>
<template> <template>
<a <gl-button
v-tooltip v-tooltip
:href="monitoringUrl" :href="monitoringUrl"
:title="title" :title="title"
:aria-label="title" :aria-label="title"
class="btn monitoring-url d-none d-sm-none d-md-block" class="monitoring-url d-none d-sm-none d-md-block"
data-container="body" data-container="body"
rel="noopener noreferrer nofollow" rel="noopener noreferrer nofollow"
variant="default"
> >
<icon name="chart" /> <icon name="chart" />
</a> </gl-button>
</template> </template>
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
}, },
"dependencies": { "dependencies": {
"@gitlab-org/gitlab-svgs": "^1.29.0", "@gitlab-org/gitlab-svgs": "^1.29.0",
"@gitlab-org/gitlab-ui": "^1.7.1", "@gitlab-org/gitlab-ui": "^1.8.0",
"autosize": "^4.0.0", "autosize": "^4.0.0",
"axios": "^0.17.1", "axios": "^0.17.1",
"babel-core": "^6.26.3", "babel-core": "^6.26.3",
......
...@@ -69,7 +69,6 @@ describe('Issue boards new issue form', () => { ...@@ -69,7 +69,6 @@ describe('Issue boards new issue form', () => {
vm.$el.querySelector('.btn-success').click(); vm.$el.querySelector('.btn-success').click();
expect(vm.submit.calls.count()).toBe(1); expect(vm.submit.calls.count()).toBe(1);
expect(vm.$refs['submit-button']).toBe(vm.$el.querySelector('.btn-success'));
}) })
.then(done) .then(done)
.catch(done.fail); .catch(done.fail);
......
...@@ -185,10 +185,10 @@ ...@@ -185,10 +185,10 @@
resolved "https://registry.yarnpkg.com/@gitlab-org/gitlab-svgs/-/gitlab-svgs-1.29.0.tgz#03b65b513f9099bbda6ecf94d673a2952f8c6c70" resolved "https://registry.yarnpkg.com/@gitlab-org/gitlab-svgs/-/gitlab-svgs-1.29.0.tgz#03b65b513f9099bbda6ecf94d673a2952f8c6c70"
integrity sha512-sCl6nP3ph36+8P3nrw9VanAR648rgOUEBlEoLPHkhKm79xB1dUkXGBtI0uaSJVgbJx40M1/Ts8HSdMv+PF3EIg== integrity sha512-sCl6nP3ph36+8P3nrw9VanAR648rgOUEBlEoLPHkhKm79xB1dUkXGBtI0uaSJVgbJx40M1/Ts8HSdMv+PF3EIg==
"@gitlab-org/gitlab-ui@^1.7.1": "@gitlab-org/gitlab-ui@^1.8.0":
version "1.7.1" version "1.8.0"
resolved "https://registry.yarnpkg.com/@gitlab-org/gitlab-ui/-/gitlab-ui-1.7.1.tgz#e9cce86cb7e34311405e705c1de674276b453f17" resolved "https://registry.yarnpkg.com/@gitlab-org/gitlab-ui/-/gitlab-ui-1.8.0.tgz#dee33d78f68c91644273dbd51734b796108263ee"
integrity sha512-X12W39lFnWmfmYcHBokrauKvp6VLW9u0rFdgBXWlnrRL2hBShnyeBsBXKLMGUGnofMtgYv3iYO/rFW9IB79lFg== integrity sha512-Owm8bkP4vEihiLD3pmMw1r+UWr3WYGaGUtj0JcwaAg3d05ZneozFEZjazIOWeYTcFsk+ZvNmSk1UA+ARIauhgQ==
dependencies: dependencies:
"@gitlab-org/gitlab-svgs" "^1.23.0" "@gitlab-org/gitlab-svgs" "^1.23.0"
bootstrap-vue "^2.0.0-rc.11" bootstrap-vue "^2.0.0-rc.11"
......
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