@chainplatform/layout 0.2.9 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/Exam.js +7 -4
package/package.json
CHANGED
package/src/Exam.js
CHANGED
|
@@ -1,18 +1,21 @@
|
|
|
1
|
-
import sdkStyles from './styles';
|
|
1
|
+
import sdkStyles, { setSize } from './styles';
|
|
2
2
|
|
|
3
3
|
export function getDoExamLayout(layoutWidth) {
|
|
4
4
|
let totalItem = 1;
|
|
5
|
+
let basePadding = setSize(15);
|
|
5
6
|
let mainViewWidth = layoutWidth;
|
|
6
7
|
let subViewWitdh = mainViewWidth;
|
|
7
8
|
if (layoutWidth > sdkStyles.base_desktop) {
|
|
8
9
|
totalItem = 2;
|
|
9
|
-
|
|
10
|
-
|
|
10
|
+
let width = layoutWidth - (2 * (totalItem + 1)) * basePadding;
|
|
11
|
+
mainViewWidth = width * 0.7;
|
|
12
|
+
subViewWitdh = width - mainViewWidth;
|
|
11
13
|
}
|
|
12
14
|
|
|
13
15
|
return {
|
|
14
16
|
totalItem,
|
|
15
17
|
mainViewWidth,
|
|
16
|
-
subViewWitdh
|
|
18
|
+
subViewWitdh,
|
|
19
|
+
basePadding
|
|
17
20
|
};
|
|
18
21
|
}
|