@controleonline/ui-common 1.2.123 → 1.2.124
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
|
@@ -45,10 +45,13 @@ export default StyleSheet.create({
|
|
|
45
45
|
padding: 16,
|
|
46
46
|
},
|
|
47
47
|
modalPanel: {
|
|
48
|
+
alignSelf: 'center',
|
|
48
49
|
backgroundColor: '#FFFFFF',
|
|
49
50
|
borderRadius: 18,
|
|
50
51
|
maxHeight: '80%',
|
|
52
|
+
maxWidth: '100%',
|
|
51
53
|
overflow: 'hidden',
|
|
54
|
+
width: 480,
|
|
52
55
|
},
|
|
53
56
|
modalHeader: {
|
|
54
57
|
alignItems: 'center',
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import assert from 'node:assert/strict';
|
|
2
|
+
import test from 'node:test';
|
|
3
|
+
import fs from 'node:fs';
|
|
4
|
+
|
|
5
|
+
const styles = fs.readFileSync(
|
|
6
|
+
new URL('../../../react/components/AppTypeSwitcher.styles.js', import.meta.url),
|
|
7
|
+
'utf8',
|
|
8
|
+
).replace(/\r\n/g, '\n');
|
|
9
|
+
|
|
10
|
+
test('app type selector modal is 480px wide, centered and never wider than the screen (#1512)', () => {
|
|
11
|
+
const panel = /modalPanel: \{([^}]*)\}/.exec(styles)?.[1] || '';
|
|
12
|
+
assert.match(panel, /width: 480/);
|
|
13
|
+
assert.match(panel, /maxWidth: '100%'/);
|
|
14
|
+
assert.match(panel, /alignSelf: 'center'/);
|
|
15
|
+
});
|