import type { IconProp } from '@fortawesome/fontawesome-svg-core'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import type { ReactNode } from 'react'; import tw from 'twin.macro'; import SpinnerOverlay from '@/components/elements/SpinnerOverlay'; interface Props { icon?: IconProp; isLoading?: boolean; title: string | ReactNode; className?: string; noPadding?: boolean; children: ReactNode; button?: ReactNode; } const AdminBox = ({ icon, title, className, isLoading, children, button, noPadding }: Props) => (
{typeof title === 'string' ? (

{icon && } {title}

) : ( title )} {button}
{children}
); export default AdminBox;