refactor: improve tips/warnings

This commit is contained in:
iCrawl
2022-10-07 02:44:28 +02:00
parent f85022162d
commit baa6c69835
5 changed files with 45 additions and 26 deletions

View File

@@ -3,14 +3,18 @@ import { VscInfo } from 'react-icons/vsc';
export function Info({ children }: PropsWithChildren<{}>) {
return (
<div className="my-4 rounded border border-blue-500 p-4">
<div className="flex flex-row place-items-center gap-4">
<span className="text-blue-500">
<VscInfo size={20} />
</span>
<div className="flex flex-col gap-2 text-sm">
<span className="font-semibold text-blue-500">Info</span>
{children}
<div className="my-4">
<div className="relative flex">
<div className="p-4">{children}</div>
<div className="absolute flex h-full w-full">
<div className="rounded-tl-1.5 rounded-bl-1.5 w-4 shrink-0 border-t-2 border-b-2 border-l-2 border-blue-500" />
<div className="relative border-b-2 border-blue-500">
<div className="-translate-y-50% flex place-items-center gap-2 px-2 text-blue-500">
<VscInfo size={20} />
<span className="font-semibold text-blue-500">Info</span>
</div>
</div>
<div className="rounded-tr-1.5 rounded-br-1.5 flex-1 border-t-2 border-b-2 border-r-2 border-blue-500" />
</div>
</div>
</div>