forked from shesha-io/shesha-framework
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstyles.ts
More file actions
94 lines (81 loc) · 2.28 KB
/
styles.ts
File metadata and controls
94 lines (81 loc) · 2.28 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
import { createStyles, sheshaStyles } from '@/styles';
export const useStyles = createStyles(({ css, cx, responsive, token }, hasCode) => {
const contentJs = cx(css`
position: relative;
top: 0px;
`);
const contentCode = cx(css`
position: relative;
top: 0px;
${responsive.mobile} {
padding-top: 4px;
}
`);
const jsContent = cx(css`
position: relative;
${responsive.mobile} {
margin-left: 28px;
}
// special style when inside the sidebar
.sidebar-container & {
margin-right: 0;
}
`);
const label = cx("properties-label", css`
font-size: 12px;
color: darkslategrey;
font-weight: 500;
position: relative;
+.ant-form-item-tooltip {
align-self: end !important;
position: relative;
bottom: -2px;
margin-right: 8px;
}
+.sha-required-mark {
position: relative;
bottom: -8px;
}
`);
const bindingOptionsBtn = cx(css`
top: -8px;
`);
const jsSwitch = cx(css`
position: absolute;
right: 0;
top: 4px;
font-size: 12px;
height: 20px;
max-width: 100%;
margin-left: 5px;
margin-right: 0px;
color: ${token.colorPrimary};
display: flex;
justify-content: center;
align-items: center;
${responsive.mobile} {
right: 0;
left: auto;
top: -25px;
}
// special style when inside the sidebar
.sidebar-container & {
right: 0;
left: auto;
top: -25px;
}
.${sheshaStyles.verticalSettingsClass} & {
right: 0;
left: auto;
top: ${hasCode ? '-38px' : '-25px'};
}
`);
return {
contentJs,
contentCode,
jsContent,
label,
bindingOptionsBtn,
jsSwitch
};
});