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