import React, { FC, HTMLAttributes, ReactNode } from 'react'; import { classNames } from '../../lib/classNames'; import { getClassName } from '../../helpers/getClassName'; import { usePlatform } from '../../hooks/usePlatform'; import { hasReactNode } from '../../lib/utils'; import Caption from '../Typography/Caption/Caption'; import Tappable from '../Tappable/Tappable'; import Subhead from '../Typography/Subhead/Subhead'; import Avatar from '../Avatar/Avatar'; import { HasRef, HasRootRef } from '../../types'; interface CellTypographyProps extends HTMLAttributes { size: HorizontalCellProps['size']; } const CellTypography: FC = ({ size, children, ...restProps }: CellTypographyProps) => { return size === 's' ? {children} : {children}; }; export interface HorizontalCellProps extends HTMLAttributes, HasRootRef, HasRef { size?: 's' | 'm' | 'l'; header?: ReactNode; subtitle?: ReactNode; } export const HorizontalCell: FC = (props) => { const { className, header, subtitle, size, style, children, getRootRef, getRef, ...restProps } = props; const platform = usePlatform(); return ( {hasReactNode(children) && {children}} {hasReactNode(header) && ( {header} )} {hasReactNode(subtitle) && {subtitle}} ); }; HorizontalCell.defaultProps = { size: 's', children: , };