Merge branch 'develop' into feature/CSR-335
This commit is contained in:
commit
b43bdb3960
6 changed files with 17 additions and 14 deletions
|
|
@ -1,8 +1,8 @@
|
||||||
<!-- Documented in confluence https://safelite.atlassian.net/wiki/spaces/DC/pages/76644418/Button+Question+Component -->
|
<!-- Documented in confluence https://safelite.atlassian.net/wiki/spaces/DC/pages/76644418/Button+Question+Component -->
|
||||||
<template>
|
<template>
|
||||||
<div :class="isOverflowScrollable ? 'button_question' : ''">
|
<div :class="isOverflowScrollable ? 'button-question button-question-overflow' : 'button-question'">
|
||||||
<div v-if="questionText" class="mt-5 mb-4 d-flex">
|
<div v-if="questionText" class="mt-5 mb-4 d-flex">
|
||||||
<span class="text-center fs-5 fw-bold w-100">{{ questionText }}</span>
|
<span class="fs-5 fw-bold w-100" :class="this.buttonType === 'radio' ? 'text-start' : 'text-center'">{{ questionText }}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="w-100 d-flex justify-content-center">
|
<div class="w-100 d-flex justify-content-center">
|
||||||
<fieldset class="w-100" :class="getFieldSetClasses" :role="isMultiSelect ? 'group' : 'radiogroup'" :aria-labelledby="groupName ? groupName + '-radio-group' : ''">
|
<fieldset class="w-100" :class="getFieldSetClasses" :role="isMultiSelect ? 'group' : 'radiogroup'" :aria-labelledby="groupName ? groupName + '-radio-group' : ''">
|
||||||
|
|
@ -153,8 +153,7 @@ export default {
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.button_question {
|
.button-question-overflow {
|
||||||
color: $black;
|
|
||||||
height: calc(100vh - 280px);
|
height: calc(100vh - 280px);
|
||||||
|
|
||||||
.overflow-scroll {
|
.overflow-scroll {
|
||||||
|
|
@ -163,4 +162,7 @@ export default {
|
||||||
-webkit-overflow-scrolling: touch;
|
-webkit-overflow-scrolling: touch;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.button-question {
|
||||||
|
color: $black;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,6 @@ export default {
|
||||||
isRequired: Boolean,
|
isRequired: Boolean,
|
||||||
hasIcon: Boolean,// If input has an icon
|
hasIcon: Boolean,// If input has an icon
|
||||||
iconRight: Boolean,// Place icon on right side of text input, otherwise default is left if hasIcon prop is used
|
iconRight: Boolean,// Place icon on right side of text input, otherwise default is left if hasIcon prop is used
|
||||||
iconURL: String,
|
|
||||||
hasError: Boolean,
|
hasError: Boolean,
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,6 @@
|
||||||
placeholderText="Text Input Label"
|
placeholderText="Text Input Label"
|
||||||
inputID="test-text-input"
|
inputID="test-text-input"
|
||||||
hasIcon
|
hasIcon
|
||||||
imgUrl="~@/assets/img/icons/spinner.svg"
|
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -46,7 +45,6 @@
|
||||||
inputID="test-text-input"
|
inputID="test-text-input"
|
||||||
hasIcon
|
hasIcon
|
||||||
iconRight
|
iconRight
|
||||||
imgUrl="~@/assets/img/icons/spinner.svg"
|
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -157,9 +157,11 @@ export default {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
color: $gray-600;
|
color: $gray-600;
|
||||||
&:hover {
|
&:hover {
|
||||||
box-shadow: 0 0 0 4px $blue-300;
|
@include media-breakpoint-up(sm) {
|
||||||
cursor: pointer;
|
box-shadow: 0 0 0 4px $blue-300;
|
||||||
z-index: 4 !important;
|
cursor: pointer;
|
||||||
|
z-index: 4 !important;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
+ p {
|
+ p {
|
||||||
display: none;
|
display: none;
|
||||||
|
|
|
||||||
|
|
@ -188,7 +188,7 @@ describe("list-card.vue", () => {
|
||||||
|
|
||||||
// Assert
|
// Assert
|
||||||
const label = wrapper.find("label");
|
const label = wrapper.find("label");
|
||||||
expect(label.classes()).toEqual(["d-flex", "w-100", "align-items-center", "px-2", "h-100", "flex-column", "pt-4", "pb-2"]);
|
expect(label.classes()).toEqual(["d-flex", "w-100", "align-items-center", "px-2", "h-100", "flex-column", "pt-4", "pb-3"]);
|
||||||
});
|
});
|
||||||
|
|
||||||
it("Should emit button value on click", async () => {
|
it("Should emit button value on click", async () => {
|
||||||
|
|
|
||||||
|
|
@ -91,7 +91,7 @@ export default {
|
||||||
}
|
}
|
||||||
return classes;
|
return classes;
|
||||||
} else {
|
} else {
|
||||||
return "flex-column pt-4 pb-2";
|
return "flex-column pt-4 pb-3";
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
@ -139,8 +139,10 @@ export default {
|
||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
}
|
}
|
||||||
&:hover {
|
&:hover {
|
||||||
box-shadow: 0px 0px 0px 4px $blue-300;
|
@include media-breakpoint-up(sm) {
|
||||||
border: 1px solid transparent;
|
box-shadow: 0px 0px 0px 4px $blue-300;
|
||||||
|
border: 1px solid transparent;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
input[type="checkbox"],
|
input[type="checkbox"],
|
||||||
input[type="radio"] {
|
input[type="radio"] {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue