| 1 |
import { __ } from '@wordpress/i18n'; |
| 2 |
|
| 3 |
// Fixed top-right alert reused for every Quick Edit dismissible notice — |
| 4 |
// unsupported-block, image-save failures, and the translated-content guard. |
| 5 |
export const ErrorPill = ({ message, onDismiss }) => ( |
| 6 |
<div |
| 7 |
role="alert" |
| 8 |
className="fixed top-4 right-4 z-[9999] flex items-center gap-2 px-3 py-2 rounded bg-red-100 text-red-700 text-sm shadow" |
| 9 |
> |
| 10 |
<span>{message}</span> |
| 11 |
<button |
| 12 |
type="button" |
| 13 |
aria-label={__('Dismiss', 'extendify-local')} |
| 14 |
className="font-bold opacity-70 hover:opacity-100" |
| 15 |
onClick={onDismiss} |
| 16 |
> |
| 17 |
× |
| 18 |
</button> |
| 19 |
</div> |
| 20 |
); |
| 21 |
|