import React, { memo } from 'react'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import { IconProp } from '@fortawesome/fontawesome-svg-core'; import tw from 'twin.macro'; import isEqual from 'react-fast-compare'; interface Props { icon?: IconProp; title: string | React.ReactNode; className?: string; padding?: boolean; children: React.ReactNode; } const AdminBox = ({ icon, title, className, padding, children }: Props) => { if (padding === undefined) { padding = true; } return (
{typeof title === 'string' ?

{icon && }{title}

: title }
{children}
); }; export default memo(AdminBox, isEqual);