| 384 | children?: never; |
| 385 | }> { |
| 386 | render() { |
| 387 | const p = this.props; |
| 388 | |
| 389 | return ( |
| 390 | <RadioGroup |
| 391 | direction="column" |
| 392 | // TODO - we need to make the API more TS safe and make name optional |
| 393 | name="" |
| 394 | // @ts-expect-error |
| 395 | onChange={p.onChange} |
| 396 | // @ts-expect-error |
| 397 | options={p.options.map((kv) => ({ |
| 398 | value: kv.value, |
| 399 | disabled: p.disabled, |
| 400 | label: ( |
| 401 | <Box p={3}> |
| 402 | <Text fontWeight={500}>{kv.title}</Text> |
| 403 | <Text color="gray.500">{kv.subTitle}</Text> |
| 404 | {Boolean(kv.content) && (p.showContent === 'always' || p.value === kv.value) && ( |
| 405 | <Box key={String(kv.value)} style={{ marginLeft: '27px', marginTop: '12px' }}> |
| 406 | <div>{kv.content}</div> |
| 407 | </Box> |
| 408 | )} |
| 409 | </Box> |
| 410 | ), |
| 411 | }))} |
| 412 | // @ts-expect-error |
| 413 | value={p.value} |
| 414 | /> |
| 415 | ); |
| 416 | } |
| 417 | } |
| 418 | |
| 419 | type StatusIndicatorProps = { |