forked from ToolJet/ToolJet
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAutoLayoutAlert.jsx
More file actions
40 lines (39 loc) · 1.11 KB
/
AutoLayoutAlert.jsx
File metadata and controls
40 lines (39 loc) · 1.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
import React from 'react';
import SolidIcon from '@/_ui/Icon/SolidIcons';
import { ButtonSolid } from '@/_ui/AppButton/AppButton';
export default function AutoLayoutAlert({ show, onClick }) {
if (!show) {
return '';
}
return (
<div
style={{
position: 'absolute',
top: '0',
right: '0',
width: '300px',
padding: 'var(--7, 16px)',
background: 'var(--base)',
margin: '10px',
}}
className="d-flex flex-row"
>
<div className="pe-2">
<SolidIcon name="warning" fill="#E54D2E" />
</div>
<div style={{ fontSize: '12px', fontStyle: 'normal', fontWeight: '400', lineHeight: '20px' }}>
You have to disable auto alignment to manually adjust mobile components. Once disabled, the mobile layout will
not automatically align with desktop changes
<ButtonSolid
size="sm"
variant="tertiary"
onClick={onClick}
className="mt-2"
data-cy="disable-auto-alignment-button"
>
Disable auto alignment
</ButtonSolid>
</div>
</div>
);
}