CSR-762 Use shared props between base-input-button and input-button-wrapper-mixin
This commit is contained in:
parent
9ee87f3437
commit
b2a81875d2
3 changed files with 35 additions and 39 deletions
|
|
@ -30,39 +30,14 @@ import {
|
|||
handleInputFocus,
|
||||
handleInputBlur,
|
||||
} from "@/helpers/analytics-helper";
|
||||
import inputButtonWrapperMixin from "../../mixins/input-button-wrapper-mixin";
|
||||
import { inputButtonProps } from "@/common-components/base-input-button/button-functionality-props";
|
||||
|
||||
export default {
|
||||
name: "base-input-button",
|
||||
props: {
|
||||
// ...inputButtonWrapperMixin.props
|
||||
value: {
|
||||
type: [String, Number],
|
||||
required: true,
|
||||
},
|
||||
modelValue: {
|
||||
type: [Array, String, Number],
|
||||
required: true,
|
||||
},
|
||||
isMultiSelect: Boolean,
|
||||
groupName: {
|
||||
type: String,
|
||||
required: true,
|
||||
},
|
||||
validationRules: {
|
||||
type: String,
|
||||
default: "",
|
||||
},
|
||||
...inputButtonProps,
|
||||
buttonWrapperClasses: [String, Array, Object],
|
||||
inputClasses: [String, Array, Object],
|
||||
valueToLogType: String,
|
||||
selectOnKeypress: {
|
||||
type: Boolean,
|
||||
default: true,
|
||||
},
|
||||
isRequired: Boolean,
|
||||
lastValuePushedToGa: [String, Number],
|
||||
setLastValuePushedToGa: Function,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
|
|
|||
|
|
@ -0,0 +1,30 @@
|
|||
export const inputButtonProps = {
|
||||
value: {
|
||||
type: [String, Number],
|
||||
required: true,
|
||||
},
|
||||
modelValue: {
|
||||
type: [Array, String, Number],
|
||||
required: true,
|
||||
},
|
||||
isMultiSelect: Boolean,
|
||||
groupName: {
|
||||
type: String,
|
||||
required: true,
|
||||
},
|
||||
validationRules: {
|
||||
type: String,
|
||||
default: "",
|
||||
},
|
||||
valueToLogType: String,
|
||||
isRequired: {
|
||||
type: Boolean,
|
||||
default: true,
|
||||
},
|
||||
lastValuePushedToGa: [String, Number],
|
||||
setLastValuePushedToGa: Function,
|
||||
selectOnKeypress: {
|
||||
type: Boolean,
|
||||
default: true,
|
||||
},
|
||||
}
|
||||
|
|
@ -1,9 +1,8 @@
|
|||
import { inputButtonProps } from "@/common-components/base-input-button/button-functionality-props";
|
||||
|
||||
export default {
|
||||
props: {
|
||||
modelValue: [Array, String, Number],
|
||||
value: [String, Number],
|
||||
isMultiSelect: Boolean,
|
||||
groupName: String,
|
||||
...inputButtonProps,
|
||||
buttonLabel: [Number, String],
|
||||
buttonLabelSubCopy: String,
|
||||
buttonImage: String,
|
||||
|
|
@ -13,15 +12,7 @@ export default {
|
|||
},
|
||||
textPosition: String,
|
||||
screenReaderOnlyText: String,
|
||||
valueToLogType: String,
|
||||
validationRules: String,
|
||||
isWide: Boolean,
|
||||
isRequired: {
|
||||
type: Boolean,
|
||||
default: true,
|
||||
},
|
||||
lastValuePushedToGa: [String, Number],
|
||||
setLastValuePushedToGa: Function,
|
||||
},
|
||||
computed: {
|
||||
selectedValue: {
|
||||
|
|
|
|||
Loading…
Reference in a new issue