Commit e3aa28cc authored by Tom Quirk's avatar Tom Quirk

Bind component attrs to todo_button

parent dac3a45a
...@@ -12,11 +12,6 @@ export default { ...@@ -12,11 +12,6 @@ export default {
required: false, required: false,
default: true, default: true,
}, },
loading: {
type: Boolean,
required: false,
default: false,
},
}, },
computed: { computed: {
buttonLabel() { buttonLabel() {
...@@ -27,7 +22,7 @@ export default { ...@@ -27,7 +22,7 @@ export default {
</script> </script>
<template> <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 }} {{ buttonLabel }}
</gl-button> </gl-button>
</template> </template>
...@@ -40,7 +40,7 @@ describe('Todo Button', () => { ...@@ -40,7 +40,7 @@ describe('Todo Button', () => {
expect(wrapper.find(GlButton).text()).toBe(label); 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 }); createComponent({ loading: true });
expect(wrapper.find(GlButton).props('loading')).toBe(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