import type { PolymorphicComponentPropsWithRef, PolymorphicRef } from '../index' import React from 'react' import { classNames } from '../index' interface Props { className?: string description?: string } export type IconButtonProps = PolymorphicComponentPropsWithRef export type IconButtonComponent = ( props: IconButtonProps ) => React.ReactNode | null export const IconButton: IconButtonComponent = React.forwardRef( ( { as, children, className, description, ...rest }: IconButtonProps, ref?: PolymorphicRef, ) => { const Component = as || 'button' return ( {children} {description && ( {description} )} ) }, )