strapi-plugin-import-export-entries
Version:
Import/Export data from and to your database in just few clicks.
23 lines (18 loc) • 562 B
JavaScript
import './style.css';
import { Alert, Portal } from '@strapi/design-system';
import React from 'react';
import { useAlerts } from '../../../hooks/useAlerts';
export const Alerts = () => {
const { alerts, removeAlert } = useAlerts();
return (
<Portal>
<div className="plugin-ie-alerts">
{alerts?.map(({ id, title, message, variant }) => (
<Alert key={id} closeLabel="Close" title={title} variant={variant} onClose={() => removeAlert(id)}>
{message}
</Alert>
))}
</div>
</Portal>
);
};