import React, { ButtonHTMLAttributes, FunctionComponent, ReactNode } from 'react'; import Tappable from '../Tappable/Tappable'; import getClassName from '../../helpers/getClassName'; import classNames from '../../lib/classNames'; import usePlatform from '../../hooks/usePlatform'; export interface PanelHeaderButtonProps extends ButtonHTMLAttributes { primary?: boolean; href?: string; target?: string; label?: ReactNode; } const PanelHeaderButton: FunctionComponent = ({ className, children, primary, label, ...restProps }: PanelHeaderButtonProps) => { const isPrimitive = typeof children === 'string' || typeof children === 'number'; const Component = restProps.href ? 'a' : 'button'; const platform = usePlatform(); return ( {children} {label} ); }; PanelHeaderButton.defaultProps = { primary: false, }; export default PanelHeaderButton;