ui(admin): too many changes, not enough commits
This commit is contained in:
parent
bca2338863
commit
8aa9641ec2
44 changed files with 1955 additions and 334 deletions
|
@ -8,24 +8,31 @@ interface Props {
|
|||
icon?: IconProp;
|
||||
title: string | React.ReactNode;
|
||||
className?: string;
|
||||
padding?: boolean;
|
||||
children: React.ReactNode;
|
||||
}
|
||||
|
||||
const AdminBox = ({ icon, title, children, className }: Props) => (
|
||||
<div css={tw`rounded shadow-md bg-neutral-700`} className={className}>
|
||||
<div css={tw`bg-neutral-900 rounded-t px-6 py-3 border-b border-black`}>
|
||||
{typeof title === 'string' ?
|
||||
<p css={tw`text-sm uppercase`}>
|
||||
{icon && <FontAwesomeIcon icon={icon} css={tw`mr-2 text-neutral-300`}/>}{title}
|
||||
</p>
|
||||
:
|
||||
title
|
||||
}
|
||||
const AdminBox = ({ icon, title, className, padding, children }: Props) => {
|
||||
if (padding === undefined) {
|
||||
padding = true;
|
||||
}
|
||||
|
||||
return (
|
||||
<div css={tw`rounded shadow-md bg-neutral-700`} className={className}>
|
||||
<div css={tw`bg-neutral-900 rounded-t px-6 py-3 border-b border-black`}>
|
||||
{typeof title === 'string' ?
|
||||
<p css={tw`text-sm uppercase`}>
|
||||
{icon && <FontAwesomeIcon icon={icon} css={tw`mr-2 text-neutral-300`}/>}{title}
|
||||
</p>
|
||||
:
|
||||
title
|
||||
}
|
||||
</div>
|
||||
<div css={padding ? tw`px-6 py-4` : undefined}>
|
||||
{children}
|
||||
</div>
|
||||
</div>
|
||||
<div css={tw`px-6 py-4`}>
|
||||
{children}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
);
|
||||
};
|
||||
|
||||
export default memo(AdminBox, isEqual);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue