Skip to content

Commit 90f5cbd

Browse files
committed
restrict width of QR code label
Signed-off-by: Steve Cassidy <steve.cassidy@mq.edu.au>
1 parent 8286adf commit 90f5cbd

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/gui/fields/qrcode/QRCodeFormField.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ import {FieldProps} from 'formik';
2929
import ReactDOM from 'react-dom';
3030
import {Capacitor} from '@capacitor/core';
3131
import {createUseStyles} from 'react-jss';
32+
import {Box} from '@mui/material';
3233

3334
const useStyles = createUseStyles({
3435
container: {
@@ -123,7 +124,9 @@ export function QRCodeFormField({
123124
label={props.label || 'Scan QR Code'}
124125
onScanResult={updateField}
125126
/>
126-
<div>{valueText}</div>
127+
<Box sx={{width: '100vw', height: '2em', overflow: 'hidden'}}>
128+
{valueText}
129+
</Box>
127130
</div>
128131
);
129132
}

0 commit comments

Comments
 (0)