import { memo, type TeactNode } from '../../../lib/teact/teact'; import type { IconName } from '../../../types/icons'; import buildClassName from '../../../util/buildClassName'; import Icon from '../../common/icons/Icon'; import Button from '../../ui/Button'; import ListItem from '../../ui/ListItem'; import Modal from '../../ui/Modal'; import Separator from '../../ui/Separator'; import styles from './TableAboutModal.module.scss'; export type TableAboutData = [IconName | undefined, TeactNode, TeactNode][]; type OwnProps = { contentClassName?: string; isOpen?: boolean; listItemData?: TableAboutData; headerIconName?: IconName; header?: TeactNode; footer?: TeactNode; buttonText?: string; hasBackdrop?: boolean; withSeparator?: boolean; onClose: NoneToVoidFunction; onButtonClick?: NoneToVoidFunction; }; const TableAboutModal = ({ isOpen, listItemData, headerIconName, header, footer, buttonText, hasBackdrop, withSeparator, onClose, onButtonClick, contentClassName, }: OwnProps) => { return ( {headerIconName &&
} {header}
{listItemData?.map(([icon, title, subtitle]) => { return ( {title} {subtitle} ); })}
{withSeparator && } {footer} {buttonText && ( )}
); }; export default memo(TableAboutModal);