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

{icon && }{title}

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