import React from 'react'; import { IcNavForward } from '../res/icons'; import { SettingsIcon } from './SettingsIcon'; interface PreferenceItemProps { title: string; summary?: string; icon?: string; /** Show chevron on the right */ showChevron?: boolean; /** Right-side value text */ value?: string; /** Is this a divider (not the last item) */ showDivider?: boolean; onClick?: () => void; itemProps?: React.HTMLAttributes; children?: React.ReactNode; } /** A single preference list item */ export const PreferenceItem: React.FC = ({ title, summary, icon, showChevron = true, value, showDivider = true, onClick, itemProps, children, }) => { return (
{icon && (
)}
{title}
{summary && (
{summary}
)}
{value && ( {value} )} {children} {showChevron && !children && ( )}
{showDivider && (
)}
); };