mirror of
https://github.com/inventree/InvenTree.git
synced 2025-08-09 21:30:54 +00:00
25 lines
527 B
TypeScript
25 lines
527 B
TypeScript
import { t } from '@lingui/macro';
|
|
import { ActionIcon } from '@mantine/core';
|
|
import { openContextModal } from '@mantine/modals';
|
|
import { IconQrcode } from '@tabler/icons-react';
|
|
|
|
/**
|
|
* A button which opens the QR code scanner modal
|
|
*/
|
|
export function ScanButton() {
|
|
return (
|
|
<ActionIcon
|
|
onClick={() =>
|
|
openContextModal({
|
|
modal: 'qr',
|
|
title: t`Scan QR code`,
|
|
innerProps: {}
|
|
})
|
|
}
|
|
variant="transparent"
|
|
>
|
|
<IconQrcode />
|
|
</ActionIcon>
|
|
);
|
|
}
|