React hook component to check if the browser is supported from the supportedVersions
variable.
Can be used with any React UI, Mantine shown below.
Usage:
<BrowserSupported
isSupported={(supported) => {
if (!supported) {
showNotification({
id: 'browser-not-supported',
title: 'Browser not supported',
autoClose: false,
message: 'Please update your browser.',
color: 'red',
});
}
}}
supportedChildren={
<Text>
<BiCheckCircle
style={{
display: 'inline-flex',
}}
size={24}
/>{' '}
Browser Supported
</Text>
}
unsupportedChildren={
<Text size="xl">
<BiErrorCircle
style={{
display: 'inline-flex',
}}
size={24}
/>{' '}
Browser Unsupported
</Text>
}
/>