@chainplatform/sdk 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.
Files changed (2) hide show
  1. package/Layout.js +15 -0
  2. package/package.json +1 -1
package/Layout.js CHANGED
@@ -20,6 +20,9 @@ export function getScreenSize(layoutWidth, isDesktop, side_bar_width, styles) {
20
20
  // News
21
21
  let newsItem = 1;
22
22
  let newsPadding = 0;
23
+ // New Course
24
+ let courseItem = 1;
25
+ let coursePadding = 0;
23
26
  if (isDesktop) {
24
27
  courseSpace = styles.s30 + styles.fs15;
25
28
  newsSpace = styles.s30 + styles.fs15;
@@ -40,6 +43,9 @@ export function getScreenSize(layoutWidth, isDesktop, side_bar_width, styles) {
40
43
  // News
41
44
  newsItem = 2;
42
45
  newsPadding = styles.fs15;
46
+ // New Course
47
+ courseItem = 3;
48
+ coursePadding = styles.s30;
43
49
  }
44
50
  let viewWidth = styles.s345;
45
51
  let viewHeight = styles.s195;
@@ -59,6 +65,9 @@ export function getScreenSize(layoutWidth, isDesktop, side_bar_width, styles) {
59
65
  // News
60
66
  newsItem = 3;
61
67
  newsPadding = styles.s30;
68
+ // New Course
69
+ courseItem = 4;
70
+ coursePadding = styles.s45;
62
71
  }
63
72
  if (layoutWidth >= styles.wide_split_desktop) {
64
73
  // Course
@@ -115,9 +124,15 @@ export function getScreenSize(layoutWidth, isDesktop, side_bar_width, styles) {
115
124
  let newsItemViewWidth = layoutWidth - sideBarWidth - 2 * viewPadding - newsPadding;
116
125
  const newsItemWidth = newsItemViewWidth / newsItem;
117
126
 
127
+ let courseItemViewWidth = layoutWidth - sideBarWidth - 2 * viewPadding - coursePadding;
128
+ const courseItemWidth = courseItemViewWidth / courseItem;
129
+
118
130
  let webinarViewWidth = layoutWidth - sideBarWidth - 2 * viewPadding - (numberwebinarChart - 1) * webinarPadding;
119
131
  const webinarWidth = webinarViewWidth / numberwebinarChart;
120
132
  let view = {};
133
+ view.courseItemWidth = courseItemWidth;
134
+ view.courseItem = courseItem;
135
+ view.coursePadding = coursePadding;
121
136
  view.newsItemWidth = newsItemWidth;
122
137
  view.newsItem = newsItem;
123
138
  view.newsPadding = newsPadding;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chainplatform/sdk",
3
- "version": "0.2.9",
3
+ "version": "0.3.0",
4
4
  "description": "@chainplatform/sdk is a React Native library implement for react-native and react-native-web. Require crypto-js and react-native-mmkv packages.",
5
5
  "main": "index.js",
6
6
  "devDependencies": {