mirror of
https://github.com/r-freeman/portfolio.git
synced 2025-05-08 23:30:19 +00:00
Simplify status message component
All checks were successful
Build And Publish / BuildAndPublish (push) Successful in 3m7s
All checks were successful
Build And Publish / BuildAndPublish (push) Successful in 3m7s
This commit is contained in:
parent
bc304c61ca
commit
82f6277770
@ -16,11 +16,12 @@ export function StatusMessage({children, className, errorConditions}: StatusMess
|
||||
return (
|
||||
<>
|
||||
{children &&
|
||||
<div className={clsx(`flex items-start sm:items-center ${className ?? ''}`)}>
|
||||
{!isError ? <CheckIcon className="size-5 mt-0.5 sm:mt-0 mr-1 text-green-800 dark:text-green-600"/>
|
||||
: <CrossIcon className="size-5 mt-0.5 sm:mt-0 mr-1 text-red-800 dark:text-red-600"/>}
|
||||
<div
|
||||
className={clsx(`flex items-start sm:items-center ${className ?? ''}, ${isError ? 'text-red-800 dark:text-red-600' : 'text-green-800 dark:text-green-600'}`)}>
|
||||
{!isError ? <CheckIcon className="size-5 mt-0.5 sm:mt-0 mr-1"/>
|
||||
: <CrossIcon className="size-5 mt-0.5 sm:mt-0 mr-1 "/>}
|
||||
<p aria-live="polite" role="status"
|
||||
className={clsx('text-sm font-semibold', !isError ? 'text-green-800 dark:text-green-600' : 'text-red-800 dark:text-red-600')}>
|
||||
className="text-sm font-semibold">
|
||||
{children}
|
||||
</p>
|
||||
</div>
|
||||
|
Loading…
x
Reference in New Issue
Block a user