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