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,
|
handleInputFocus,
|
||||||
handleInputBlur,
|
handleInputBlur,
|
||||||
} from "@/helpers/analytics-helper";
|
} 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 {
|
export default {
|
||||||
name: "base-input-button",
|
name: "base-input-button",
|
||||||
props: {
|
props: {
|
||||||
// ...inputButtonWrapperMixin.props
|
...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: "",
|
|
||||||
},
|
|
||||||
buttonWrapperClasses: [String, Array, Object],
|
buttonWrapperClasses: [String, Array, Object],
|
||||||
inputClasses: [String, Array, Object],
|
inputClasses: [String, Array, Object],
|
||||||
valueToLogType: String,
|
|
||||||
selectOnKeypress: {
|
|
||||||
type: Boolean,
|
|
||||||
default: true,
|
|
||||||
},
|
|
||||||
isRequired: Boolean,
|
|
||||||
lastValuePushedToGa: [String, Number],
|
|
||||||
setLastValuePushedToGa: Function,
|
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
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 {
|
export default {
|
||||||
props: {
|
props: {
|
||||||
modelValue: [Array, String, Number],
|
...inputButtonProps,
|
||||||
value: [String, Number],
|
|
||||||
isMultiSelect: Boolean,
|
|
||||||
groupName: String,
|
|
||||||
buttonLabel: [Number, String],
|
buttonLabel: [Number, String],
|
||||||
buttonLabelSubCopy: String,
|
buttonLabelSubCopy: String,
|
||||||
buttonImage: String,
|
buttonImage: String,
|
||||||
|
|
@ -13,15 +12,7 @@ export default {
|
||||||
},
|
},
|
||||||
textPosition: String,
|
textPosition: String,
|
||||||
screenReaderOnlyText: String,
|
screenReaderOnlyText: String,
|
||||||
valueToLogType: String,
|
|
||||||
validationRules: String,
|
|
||||||
isWide: Boolean,
|
isWide: Boolean,
|
||||||
isRequired: {
|
|
||||||
type: Boolean,
|
|
||||||
default: true,
|
|
||||||
},
|
|
||||||
lastValuePushedToGa: [String, Number],
|
|
||||||
setLastValuePushedToGa: Function,
|
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
selectedValue: {
|
selectedValue: {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue