CSR-1708 center error text when <= 2 buttons.
This commit is contained in:
parent
d893a7eca0
commit
fa9683fbae
2 changed files with 17 additions and 1 deletions
|
|
@ -72,7 +72,7 @@ https://safelite.atlassian.net/wiki/spaces/DC/pages/76644418/Button+Question+Com
|
|||
</div>
|
||||
</fieldset>
|
||||
</div>
|
||||
<div class="row form-test-error">
|
||||
<div id="form-test-error" class="row form-test-error" :class="isErrorCentered ? 'text-center' : ''">
|
||||
<error-message
|
||||
role="comment"
|
||||
aria-atomic="true"
|
||||
|
|
@ -227,8 +227,18 @@ export default {
|
|||
classes += " two-list-card-width";
|
||||
}
|
||||
|
||||
if (this.buttonTypeString == "listCard" && this.buttonsInfo.length === 1) {
|
||||
classes += " one-list-card-width";
|
||||
}
|
||||
|
||||
return classes;
|
||||
},
|
||||
isErrorCentered() {
|
||||
if (this.buttonTypeString == "listCard" && this.buttonsInfo.length <= 2) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
},
|
||||
buttonsInfo() {
|
||||
return (Array.isArray(this.answers) ? this.answers : [])?.map((answer) => ({
|
||||
buttonLabel: answer.buttonLabel ?? answer.Text ?? answer,
|
||||
|
|
|
|||
|
|
@ -23,6 +23,12 @@ body {
|
|||
}
|
||||
.col {
|
||||
max-width: 236px;
|
||||
&.one-list-card-width {
|
||||
max-width: 472px;
|
||||
@include media-breakpoint-up(xl) {
|
||||
max-width: 66.6666666%;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.col-xl-4 {
|
||||
|
|
|
|||
Loading…
Reference in a new issue