mirror of
https://github.com/pybricks/pybricks-code.git
synced 2026-09-14 18:46:17 +00:00
22 lines
605 B
TypeScript
22 lines
605 B
TypeScript
// SPDX-License-Identifier: MIT
|
|
// Copyright (c) 2022 The Pybricks Authors
|
|
|
|
import { Intent } from '@blueprintjs/core';
|
|
import React from 'react';
|
|
import { CreateToast } from '../../i18nToaster';
|
|
import { useI18n } from './i18n';
|
|
|
|
const ReleaseButton: React.VoidFunctionComponent = () => {
|
|
const i18n = useI18n();
|
|
return <p>{i18n.translate('releaseButton.message')}</p>;
|
|
};
|
|
|
|
export const releaseButton: CreateToast = (onAction) => {
|
|
return {
|
|
message: <ReleaseButton />,
|
|
icon: 'info-sign',
|
|
intent: Intent.PRIMARY,
|
|
onDismiss: () => onAction('dismiss'),
|
|
};
|
|
};
|