Skip to content

Commit ca4d4e9

Browse files
authored
Merge pull request #160 from ditdot-dev/example/image-label
Add multiple choice question with image labels to questionnaire example
2 parents c65e5a2 + 19442d1 commit ca4d4e9

File tree

6 files changed

+43
-6
lines changed

6 files changed

+43
-6
lines changed

examples/questionnaire/Example.vue

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,37 @@
102102
type: QuestionType.Email,
103103
required: true,
104104
placeholder: 'Start typing here...'
105+
}),
106+
new QuestionModel({
107+
id: 'multiple_choice_image',
108+
tagline: "Let's take it one step further...",
109+
title: 'Tell us what is your favorite social network hangout.',
110+
helpTextShow: false,
111+
type: QuestionType.MultiplePictureChoice,
112+
multiple: false,
113+
required: true,
114+
options: [
115+
new ChoiceOption({
116+
imageSrc: require('./assets/images/facebook.png'),
117+
imageAlt: 'Facebook logo',
118+
label: 'Facebook'
119+
}),
120+
new ChoiceOption({
121+
imageSrc: require('./assets/images/twitter.png'),
122+
imageAlt: 'Twitter logo',
123+
label: 'Twitter'
124+
}),
125+
new ChoiceOption({
126+
imageSrc: require('./assets/images/instagram.png'),
127+
imageAlt: 'Instagram logo',
128+
label: 'Instagram'
129+
}),
130+
new ChoiceOption({
131+
imageSrc: require('./assets/images/tiktok.png'),
132+
imageAlt: 'TikTok logo',
133+
label: 'TikTok'
134+
}),
135+
]
105136
}),
106137
new QuestionModel({
107138
id: 'phone',
Loading
Loading
Loading
Loading

src/assets/css/common.css

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -634,7 +634,7 @@ header.vff-header svg.f-logo {
634634
*/
635635

636636
.vff .field-multiplepicturechoice ul.f-radios{
637-
max-width: 800px;
637+
max-width: 750px;
638638
min-width: auto;
639639
display: -ms-flexbox;
640640
display: flex;
@@ -671,7 +671,7 @@ header.vff-header svg.f-logo {
671671
justify-content: center;
672672
overflow: hidden;
673673
width: 100%;
674-
height: 164px;
674+
height: 140px;
675675
margin-bottom: 8px;
676676
}
677677

@@ -944,8 +944,10 @@ header.vff-header svg.f-logo {
944944

945945
.vff .field-multiplepicturechoice ul.f-radios li{
946946
font-size: 14px;
947-
-ms-flex: 0 0 calc(33.3333% - 8px);
948-
flex: 0 0 calc(33.3333% - 8px);
947+
}
948+
949+
.vff .field-multiplepicturechoice ul.f-radios li span.f-image{
950+
height: 90px;
949951
}
950952

951953
}
@@ -1021,8 +1023,8 @@ header.vff-header svg.f-logo {
10211023
font-size: 16px;
10221024
}
10231025

1024-
.vff .field-multiplepicturechoice ul.f-radios li span.f-image{
1025-
height: 130px;
1026+
.vff .field-multiplepicturechoice ul.f-radios {
1027+
max-width: 320px;
10261028
}
10271029

10281030
.vff .field-multiplepicturechoice ul.f-radios li{
@@ -1067,4 +1069,8 @@ header.vff-header svg.f-logo {
10671069
font-size: .6em;
10681070
}
10691071

1072+
.vff .field-multiplepicturechoice ul.f-radios li span.f-image{
1073+
height: 90px;
1074+
}
1075+
10701076
}

0 commit comments

Comments
 (0)