| 1 | import { SymbolView } from "../../components/AppSymbol"; |
| 2 | import { |
| 3 | ModelRowContent, |
| 4 | ChoiceRowContent, |
| 5 | type ModelRowProps, |
| 6 | type ChoiceRowProps, |
| 7 | } from "./ThreadSettingsRows.shared"; |
| 8 | |
| 9 | function SelectedCheckmark(props: { readonly selected: boolean }) { |
| 10 | return props.selected ? ( |
| 11 | <SymbolView |
| 12 | name="checkmark" |
| 13 | size={16} |
| 14 | tintColorClassName="accent-icon" |
| 15 | type="monochrome" |
| 16 | weight="semibold" |
| 17 | /> |
| 18 | ) : null; |
| 19 | } |
| 20 | |
| 21 | export function ModelRow(props: ModelRowProps) { |
| 22 | return ( |
| 23 | <ModelRowContent |
| 24 | {...props} |
| 25 | labelNumberOfLines={1} |
| 26 | trailingSelection={<SelectedCheckmark selected={props.selected} />} |
| 27 | /> |
| 28 | ); |
| 29 | } |
| 30 | |
| 31 | export function ChoiceRow(props: ChoiceRowProps) { |
| 32 | return ( |
| 33 | <ChoiceRowContent |
| 34 | {...props} |
| 35 | trailingSelection={<SelectedCheckmark selected={props.selected} />} |
| 36 | /> |
| 37 | ); |
| 38 | } |