feat: pre-populate server info from plex.tv API (#563)

Co-authored-by: sct <sctsnipe@gmail.com>
This commit is contained in:
Chris Pritchard
2021-01-25 07:34:21 +00:00
committed by GitHub
parent b3313a7f4d
commit 82ac76b054
11 changed files with 741 additions and 76 deletions

View File

@@ -2,7 +2,7 @@ import React from 'react';
interface AlertProps {
title: string;
type?: 'warning' | 'info';
type?: 'warning' | 'info' | 'error';
}
const Alert: React.FC<AlertProps> = ({ title, children, type }) => {
@@ -51,6 +51,29 @@ const Alert: React.FC<AlertProps> = ({ title, children, type }) => {
),
};
break;
case 'error':
design = {
bgColor: 'bg-red-600',
titleColor: 'text-red-200',
textColor: 'text-red-300',
svg: (
<svg
className="w-5 h-5"
fill="none"
stroke="currentColor"
viewBox="0 0 24 24"
xmlns="http://www.w3.org/2000/svg"
>
<path
strokeLinecap="round"
strokeLinejoin="round"
strokeWidth={2}
d="M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"
/>
</svg>
),
};
break;
}
return (