@chainplatform/sdk 0.1.11 → 0.1.13
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/Layout.js +16 -1
- package/package.json +2 -3
package/Layout.js
CHANGED
@@ -68,7 +68,21 @@ export function getScreenSize(layoutWidth, isDesktop, side_bar_width, styles) {
|
|
68
68
|
const courseWidth = courseViewWidth / courseTotalItem;
|
69
69
|
newsViewWidth = layoutWidth - sideBarWidth - 2 * viewPadding - newsSpace;
|
70
70
|
const newsWidth = newsViewWidth / newsTotalItem;
|
71
|
-
|
71
|
+
let numberChart = 1;
|
72
|
+
let padding = styles.s30;
|
73
|
+
if (layoutWidth > 600 && layoutWidth < styles.base_desktop) {
|
74
|
+
numberChart = 2;
|
75
|
+
padding = styles.s45;
|
76
|
+
}
|
77
|
+
if (layoutWidth >= styles.base_desktop && layoutWidth < styles.split_desktop) {
|
78
|
+
numberChart = 3;
|
79
|
+
padding = styles.s60;
|
80
|
+
}
|
81
|
+
if (layoutWidth >= styles.split_desktop) {
|
82
|
+
numberChart = 4;
|
83
|
+
padding = styles.s75;
|
84
|
+
}
|
85
|
+
const percentWidth = 100 / numberChart;
|
72
86
|
let view = {};
|
73
87
|
view.viewPadding = viewPadding;
|
74
88
|
view.sideBarWidth = sideBarWidth;
|
@@ -81,6 +95,7 @@ export function getScreenSize(layoutWidth, isDesktop, side_bar_width, styles) {
|
|
81
95
|
view.courseWidth = courseWidth;
|
82
96
|
view.newsWidth = newsWidth;
|
83
97
|
view.splitPadding = splitPadding;
|
98
|
+
view.percentWidth = percentWidth + "%";
|
84
99
|
return view;
|
85
100
|
}
|
86
101
|
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@chainplatform/sdk",
|
3
|
-
"version": "0.1.
|
3
|
+
"version": "0.1.13",
|
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": {
|
@@ -31,7 +31,6 @@
|
|
31
31
|
"react-native": "*",
|
32
32
|
"react-native-web": "*",
|
33
33
|
"react-native-mmkv": "*",
|
34
|
-
"crypto-js": "*"
|
35
|
-
"dayjs": "*"
|
34
|
+
"crypto-js": "*"
|
36
35
|
}
|
37
36
|
}
|