Commit e3aa28cc authored by Tom Quirk's avatar Tom Quirk

Bind component attrs to todo_button

parent dac3a45a
......@@ -12,11 +12,6 @@ export default {
required: false,
default: true,
},
loading: {
type: Boolean,
required: false,
default: false,
},
},
computed: {
buttonLabel() {
......@@ -27,7 +22,7 @@ export default {
</script>
<template>
<gl-button :loading="loading" :aria-label="buttonLabel" @click="$emit('click', $event)">
<gl-button v-bind="$attrs" :aria-label="buttonLabel" @click="$emit('click', $event)">
{{ buttonLabel }}
</gl-button>
</template>
......@@ -40,7 +40,7 @@ describe('Todo Button', () => {
expect(wrapper.find(GlButton).text()).toBe(label);
});
it('sets button props correctly when `loading` is true', () => {
it('binds additional props to GlButton', () => {
createComponent({ loading: true });
expect(wrapper.find(GlButton).props('loading')).toBe(true);
......
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