import clsx from 'clsx'; import { motion } from 'framer-motion'; import { animateDropdownItem } from '@/styling/animations'; import { globals } from '@/utils/constants'; import { CProps } from '../props'; interface DropdownButtonProps extends CProps.AnimatedButton { /** Icon to display first (not used if children are provided). */ icon?: React.ReactNode; /** Text to display second (not used if children are provided). */ text?: string; /** Custom children to display. */ children?: React.ReactNode; } /** * DropdownButton animated component that renders a `button` with optional text, icon, and click functionality. * It supports optional children for custom content or the default text/icon display. */ function DropdownButton({ icon, text, className, title, titleHtml, hideTitle, onClick, children, ...restProps }: DropdownButtonProps) { return ( {children ? children : null} {!children && icon ? icon : null} {!children && text ? {text} : null} ); } export default DropdownButton;