@chainplatform/layout 0.2.8 → 0.2.9

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.
Files changed (3) hide show
  1. package/index.js +2 -0
  2. package/package.json +1 -1
  3. package/src/Exam.js +18 -0
package/index.js CHANGED
@@ -14,6 +14,7 @@ import { getScreenLanding } from "./src/Landing";
14
14
  import sdkStyles, { setSize } from "./src/styles";
15
15
  import sdkColors from "./src/colors";
16
16
  import mobileCheck from "./src/DeviceDetect";
17
+ import { getDoExamLayout } from "./src/Exam";
17
18
 
18
19
  export default sdkStyles;
19
20
  export {
@@ -29,6 +30,7 @@ export {
29
30
  getCourseLearingLayout,
30
31
  getScreenWebinarSize,
31
32
  getScreenLanding,
33
+ getDoExamLayout,
32
34
  sdkColors,
33
35
  setSize,
34
36
  mobileCheck
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chainplatform/layout",
3
- "version": "0.2.8",
3
+ "version": "0.2.9",
4
4
  "description": "@chainplatform/layout",
5
5
  "main": "index.js",
6
6
  "devDependencies": {
package/src/Exam.js ADDED
@@ -0,0 +1,18 @@
1
+ import sdkStyles from './styles';
2
+
3
+ export function getDoExamLayout(layoutWidth) {
4
+ let totalItem = 1;
5
+ let mainViewWidth = layoutWidth;
6
+ let subViewWitdh = mainViewWidth;
7
+ if (layoutWidth > sdkStyles.base_desktop) {
8
+ totalItem = 2;
9
+ mainViewWidth = layoutWidth * 0.7;
10
+ subViewWitdh = layoutWidth - mainViewWidth;
11
+ }
12
+
13
+ return {
14
+ totalItem,
15
+ mainViewWidth,
16
+ subViewWitdh
17
+ };
18
+ }