mirror of
https://github.com/pybricks/pybricks-code.git
synced 2026-09-14 10:35:11 +00:00
alerts: use shorthand return
This commit is contained in:
committed by
David Lechner
parent
95199e44c1
commit
9fe62467d5
@@ -20,11 +20,9 @@ const FileInUseAlert: React.VoidFunctionComponent<FileInUseAlertProps> = ({
|
||||
export const fileInUse: CreateToast<{ fileName: string }> = (
|
||||
onAction,
|
||||
{ fileName },
|
||||
) => {
|
||||
return {
|
||||
message: <FileInUseAlert fileName={fileName} />,
|
||||
icon: 'error',
|
||||
intent: Intent.DANGER,
|
||||
onDismiss: () => onAction('dismiss'),
|
||||
};
|
||||
};
|
||||
) => ({
|
||||
message: <FileInUseAlert fileName={fileName} />,
|
||||
icon: 'error',
|
||||
intent: Intent.DANGER,
|
||||
onDismiss: () => onAction('dismiss'),
|
||||
});
|
||||
|
||||
@@ -17,11 +17,9 @@ const NoFilesToBackup: React.VoidFunctionComponent = () => {
|
||||
);
|
||||
};
|
||||
|
||||
export const noFilesToBackup: CreateToast = (onAction) => {
|
||||
return {
|
||||
message: <NoFilesToBackup />,
|
||||
icon: 'info-sign',
|
||||
intent: Intent.PRIMARY,
|
||||
onDismiss: () => onAction('dismiss'),
|
||||
};
|
||||
};
|
||||
export const noFilesToBackup: CreateToast = (onAction) => ({
|
||||
message: <NoFilesToBackup />,
|
||||
icon: 'info-sign',
|
||||
intent: Intent.PRIMARY,
|
||||
onDismiss: () => onAction('dismiss'),
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user