Skip to content

Commit

Permalink
Merge pull request #233 from PrefectHQ/base-input-disabled
Browse files Browse the repository at this point in the history
Feature: adding disabled to attrs
  • Loading branch information
stackoverfloweth authored Jun 3, 2022
2 parents a54fe15 + 99a2d52 commit 545342a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/components/BaseInput/BaseInput.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{{ prepend }}
</div>
<slot name="prepend" />
<slot name="control" :attrs="attrs" />
<slot name="control" :attrs="attrsWithDisabled" />
<div v-if="append" class="base-input__append">
{{ append }}
</div>
Expand Down Expand Up @@ -53,6 +53,11 @@
'base-input--failed': failed.value,
'base-input--pending': props.state?.pending,
}))
const attrsWithDisabled = computed(() => ({
...attrs,
disabled: props.disabled,
}))
</script>
<style>
Expand Down

0 comments on commit 545342a

Please sign in to comment.