mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-17 01:56:27 +08:00
33 lines
599 B
TypeScript
33 lines
599 B
TypeScript
import { CloseIcon } from '@blocksuite/icons/rc';
|
|
import type { ReactNode } from 'react';
|
|
|
|
import {
|
|
browserWarningStyle,
|
|
closeButtonStyle,
|
|
closeIconStyle,
|
|
} from './index.css';
|
|
|
|
export const BrowserWarning = ({
|
|
show,
|
|
onClose,
|
|
message,
|
|
}: {
|
|
show: boolean;
|
|
onClose: () => void;
|
|
message: ReactNode;
|
|
}) => {
|
|
if (!show) {
|
|
return null;
|
|
}
|
|
return (
|
|
<div className={browserWarningStyle}>
|
|
{message}
|
|
<div className={closeButtonStyle} onClick={onClose}>
|
|
<CloseIcon className={closeIconStyle} />
|
|
</div>
|
|
</div>
|
|
);
|
|
};
|
|
|
|
export default BrowserWarning;
|