Skip to content

Commit bdf4b64

Browse files
committed
Ending BaseButton code
1 parent db7b65a commit bdf4b64

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/App.vue

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,9 @@ textarea {
216216
[hidden] {
217217
display: none;
218218
}
219+
.error {
220+
border: 1px solid red;
221+
}
219222
select {
220223
width: 100%;
221224
height: 52px;

src/components/BaseButton.vue

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,19 @@
11
<template>
22
<div>
3-
<button v-on="$listeners" v-bind="$attrs">
3+
<button v-on="$listeners" v-bind="$attrs" class="button" :class="buttonClass">
44
<slot/>
55
</button>
66
</div>
77
</template>
88

99
<script>
1010
export default {
11-
inheritAttrs: true
11+
inheritAttrs: false,
12+
props: {
13+
buttonClass: {
14+
type: String
15+
}
16+
}
1217
}
1318
</script>
1419

0 commit comments

Comments
 (0)