import React, { FunctionComponent, HTMLAttributes, ReactNode } from 'react'; import classNames from '../../lib/classNames'; import getClassName from '../../helpers/getClassName'; import Tappable from '../Tappable/Tappable'; import usePlatform from '../../hooks/usePlatform'; interface PanelHeaderContentProps extends HTMLAttributes { aside: ReactNode; before: ReactNode; status: ReactNode; } const PanelHeaderContent: FunctionComponent = ({ className, style, aside, status, before, children, onClick, ...restProps }: PanelHeaderContentProps) => { const InComponent = onClick ? Tappable : 'div'; const rootProps = onClick ? {} : restProps; const inProps = onClick ? { ...restProps, activeEffectDelay: 200 } : {}; const platform = usePlatform(); const baseClassNames = getClassName('PanelHeaderContent', platform); return (
{before &&
{before}
} {status &&
{status}
}
{children} {aside &&
{aside}
}
{before &&
}
); }; export default PanelHeaderContent;