mirror of
https://github.com/pybricks/pybricks-code.git
synced 2026-09-12 17:45:22 +00:00
20 lines
576 B
TypeScript
20 lines
576 B
TypeScript
// SPDX-License-Identifier: MIT
|
|
// Copyright (c) 2022 The Pybricks Authors
|
|
|
|
import { Intent } from '@blueprintjs/core';
|
|
import React from 'react';
|
|
import type { CreateToast } from '../../toasterTypes';
|
|
import { useI18n } from './i18n';
|
|
|
|
const NoDfuInterface: React.VoidFunctionComponent = () => {
|
|
const i18n = useI18n();
|
|
return <p>{i18n.translate('noDfuInterface.message')}</p>;
|
|
};
|
|
|
|
export const noDfuInterface: CreateToast = (onAction) => ({
|
|
message: <NoDfuInterface />,
|
|
icon: 'error',
|
|
intent: Intent.DANGER,
|
|
onDismiss: () => onAction('dismiss'),
|
|
});
|