|
6 | 6 |
|
7 | 7 | import { User } from "@gitpod/gitpod-protocol";
|
8 | 8 | import { FC, useCallback, useMemo, useState } from "react";
|
| 9 | +import { CheckboxInput } from "../components/forms/CheckboxInput"; |
9 | 10 | import { InputField } from "../components/forms/InputField";
|
10 | 11 | import { SelectInputField } from "../components/forms/SelectInputField";
|
11 | 12 | import { TextInputField } from "../components/forms/TextInputField";
|
@@ -186,50 +187,38 @@ export const StepOrgInfo: FC<Props> = ({ user, onComplete }) => {
|
186 | 187 | <InputField label="I'm exploring Gitpod..." />
|
187 | 188 | <div className="mt-4 ml-2 space-y-2">
|
188 | 189 | {explorationReasonsOptions.map((o) => (
|
189 |
| - <div key={o.value} className="flex space-x-2 justify-start items-center"> |
190 |
| - <input |
191 |
| - type="checkbox" |
192 |
| - className="rounded" |
193 |
| - value={o.value} |
194 |
| - id={`explore_${o.value}`} |
195 |
| - checked={explorationReasons.includes(o.value)} |
196 |
| - onChange={(e) => { |
197 |
| - if (e.target.checked) { |
198 |
| - addExplorationReason(o.value); |
199 |
| - } else { |
200 |
| - removeExplorationReason(o.value); |
201 |
| - } |
202 |
| - }} |
203 |
| - /> |
204 |
| - <label className="text-sm dark:text-gray-400 text-gray-600" htmlFor={`explore_${o.value}`}> |
205 |
| - {o.label} |
206 |
| - </label> |
207 |
| - </div> |
| 190 | + <CheckboxInput |
| 191 | + key={o.value} |
| 192 | + value={o.value} |
| 193 | + label={o.label} |
| 194 | + checked={explorationReasons.includes(o.value)} |
| 195 | + onChange={(checked) => { |
| 196 | + if (checked) { |
| 197 | + addExplorationReason(o.value); |
| 198 | + } else { |
| 199 | + removeExplorationReason(o.value); |
| 200 | + } |
| 201 | + }} |
| 202 | + /> |
208 | 203 | ))}
|
209 | 204 | </div>
|
210 | 205 |
|
211 | 206 | <InputField label="I'm signing up for Gitpod to..." />
|
212 | 207 | <div className="mt-4 ml-2 space-y-2">
|
213 | 208 | {signupGoalsOptions.map((o) => (
|
214 |
| - <div key={o.value} className="flex space-x-2 justify-start items-center"> |
215 |
| - <input |
216 |
| - type="checkbox" |
217 |
| - className="rounded" |
218 |
| - value={o.value} |
219 |
| - id={`goals_${o.value}`} |
220 |
| - checked={signupGoals.includes(o.value)} |
221 |
| - onChange={(e) => { |
222 |
| - if (e.target.checked) { |
223 |
| - addSignupGoal(o.value); |
224 |
| - } else { |
225 |
| - removeSignupGoal(o.value); |
226 |
| - } |
227 |
| - }} |
228 |
| - /> |
229 |
| - <label className="text-sm dark:text-gray-400 text-gray-600" htmlFor={`goals_${o.value}`}> |
230 |
| - {o.label} |
231 |
| - </label> |
232 |
| - </div> |
| 209 | + <CheckboxInput |
| 210 | + key={o.value} |
| 211 | + value={o.value} |
| 212 | + label={o.label} |
| 213 | + checked={signupGoals.includes(o.value)} |
| 214 | + onChange={(checked) => { |
| 215 | + if (checked) { |
| 216 | + addSignupGoal(o.value); |
| 217 | + } else { |
| 218 | + removeSignupGoal(o.value); |
| 219 | + } |
| 220 | + }} |
| 221 | + /> |
233 | 222 | ))}
|
234 | 223 | </div>
|
235 | 224 |
|
|
0 commit comments