Merge pull request #234 from Safelite/CSR-342-add-button-question
CSR-342 replace radio with button-question.
This commit is contained in:
commit
2c3c8d4933
2 changed files with 22 additions and 34 deletions
|
|
@ -1,7 +1,7 @@
|
||||||
<template>
|
<template>
|
||||||
|
|
||||||
<div class="container-fluid nested-radio">
|
<div class="container-fluid nested-radio">
|
||||||
<div class="row mb-1 demo-animate"><!-- demo-animate for demo only -->
|
<div class="row mb-1">
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<listCard
|
<listCard
|
||||||
groupName="listcard1"
|
groupName="listcard1"
|
||||||
|
|
@ -12,24 +12,17 @@
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row mb-1 show-hide"><!-- show-hide for demo only -->
|
<div class="row mb-1">
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<p class="mb-0 fw-bold">Ok, select the features</p>
|
<p class="mb-0 fw-bold">Ok, select the features</p>
|
||||||
<radio ref="radio"
|
<buttonQuestion
|
||||||
groupName="group1"
|
buttonType="radio"
|
||||||
buttonLabel="rain sensor, solar, 3rd visor band"
|
groupName="Demo Group"
|
||||||
buttonID="button1"
|
buttonID="button1"
|
||||||
isRequired
|
isRequired
|
||||||
value="test button"
|
value="test button"
|
||||||
screenReaderOnlyText="rain sensor, solar, 3rd visor band"
|
screenReaderOnlyText="rain sensor, solar, 3rd visor band"
|
||||||
/>
|
:answers="demoArray"
|
||||||
<radio ref="radio"
|
|
||||||
groupName="group1"
|
|
||||||
buttonLabel="rain sensor, heated glass, solar, 3rd visor band"
|
|
||||||
buttonID="button2"
|
|
||||||
isRequired
|
|
||||||
value="test button"
|
|
||||||
screenReaderOnlyText="rain sensor, heated glass, solar, 3rd visor band"
|
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -49,14 +42,24 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import buttonQuestion from "@/common-components/button-question/button-question";
|
||||||
import listCard from "@/ux-components/list-card/list-card";
|
import listCard from "@/ux-components/list-card/list-card";
|
||||||
import radio from "@/ux-components/radio/radio";
|
import radio from "@/ux-components/radio/radio";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "nestedRadio",
|
name: "nestedRadio",
|
||||||
components: {
|
components: {
|
||||||
|
buttonQuestion,
|
||||||
radio,
|
radio,
|
||||||
listCard,
|
listCard,
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
demoArray: [
|
||||||
|
"rain sensor, solar, 3rd visor band",
|
||||||
|
"rain sensor, heated glass, solar, 3rd visor band",
|
||||||
|
]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
@ -64,26 +67,11 @@ export default {
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.nested-radio {
|
.nested-radio {
|
||||||
.ui-radio {
|
.ui-radio {
|
||||||
|
flex-direction: column;
|
||||||
margin: .25rem 0;
|
margin: .25rem 0;
|
||||||
}
|
}
|
||||||
p {
|
p {
|
||||||
font-size: .875rem;
|
font-size: .875rem;
|
||||||
}
|
}
|
||||||
// For demo only
|
|
||||||
padding: 20px;
|
|
||||||
.show-hide {
|
|
||||||
max-height: 0;
|
|
||||||
transition: max-height 0.35s ease-out;
|
|
||||||
overflow: hidden;
|
|
||||||
}
|
|
||||||
.demo-animate {
|
|
||||||
&:hover {
|
|
||||||
+ .show-hide {
|
|
||||||
max-height: 140px;
|
|
||||||
transition: max-height 0.35s ease-in;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// END for demo only
|
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
<template>
|
<template>
|
||||||
<!-- Checkbox groups MUST be wrapped in a <fieldset> and <legend> tag and must contain tabindex -->
|
<!-- Checkbox groups MUST be wrapped in a <fieldset> and <legend> tag and must contain tabindex -->
|
||||||
<div class="ui-radio d-flex form-check" :class="[hasError ? 'has-error' : '']">
|
<div class="ui-radio form-check" :class="[hasError ? 'has-error' : '']">
|
||||||
<input
|
<input
|
||||||
type="radio"
|
type="radio"
|
||||||
class="form-check-input"
|
class="form-check-input"
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue