@onehat/ui 0.4.21 → 0.4.22
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
CHANGED
|
@@ -33,6 +33,7 @@ function ManagerScreen(props) {
|
|
|
33
33
|
[isModeSet, setIsModeSet] = useState(false),
|
|
34
34
|
[allowSideBySide, setAllowSideBySide] = useState(false),
|
|
35
35
|
[mode, setModeRaw] = useState(MODE_FULL),
|
|
36
|
+
actualMode = (!allowSideBySide || mode === MODE_FULL) ? MODE_FULL : MODE_SIDE,
|
|
36
37
|
setMode = (newMode) => {
|
|
37
38
|
if (!allowSideBySide && newMode === MODE_SIDE) {
|
|
38
39
|
return;
|
|
@@ -74,14 +75,13 @@ function ManagerScreen(props) {
|
|
|
74
75
|
})();
|
|
75
76
|
}, [isRendered]);
|
|
76
77
|
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
whichComponent = fullModeComponent;
|
|
80
|
-
} else if (mode === MODE_SIDE) {
|
|
81
|
-
whichComponent = sideModeComponent;
|
|
78
|
+
if (self) {
|
|
79
|
+
self.mode = actualMode;
|
|
82
80
|
}
|
|
83
81
|
|
|
84
|
-
const
|
|
82
|
+
const
|
|
83
|
+
whichComponent = actualMode === MODE_FULL ? fullModeComponent : sideModeComponent,
|
|
84
|
+
textProps = {};
|
|
85
85
|
if (styles.MANAGER_SCREEN_TITLE) {
|
|
86
86
|
textProps.style = {
|
|
87
87
|
fontFamily: styles.MANAGER_SCREEN_TITLE,
|
|
@@ -104,7 +104,7 @@ function ManagerScreen(props) {
|
|
|
104
104
|
size: 'xl',
|
|
105
105
|
className: 'text-black',
|
|
106
106
|
}}
|
|
107
|
-
isDisabled={
|
|
107
|
+
isDisabled={actualMode === MODE_FULL}
|
|
108
108
|
onPress={() => setMode(MODE_FULL)}
|
|
109
109
|
tooltip="To full width"
|
|
110
110
|
className="ml-5"
|
|
@@ -116,7 +116,7 @@ function ManagerScreen(props) {
|
|
|
116
116
|
size: 'xl',
|
|
117
117
|
className: 'text-black',
|
|
118
118
|
}}
|
|
119
|
-
isDisabled={
|
|
119
|
+
isDisabled={actualMode === MODE_SIDE}
|
|
120
120
|
onPress={() => setMode(MODE_SIDE)}
|
|
121
121
|
tooltip="To side editor"
|
|
122
122
|
/>
|