@pushwoosh/smart-components-kit 2.2.0 → 2.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.
|
@@ -9,6 +9,8 @@ type SelectLanguageProps = {
|
|
|
9
9
|
onChangeLanguages: (languages: string[]) => void;
|
|
10
10
|
/** Count subscribers on these platforms only; see LANGUAGE_PLATFORMS. */
|
|
11
11
|
platforms?: AllPlatforms[];
|
|
12
|
+
/** Size the language button to its label instead of the 200px minimum (default `false`). */
|
|
13
|
+
fitContent?: boolean;
|
|
12
14
|
};
|
|
13
15
|
export declare const LanguagesSelector: FC<SelectLanguageProps>;
|
|
14
16
|
export {};
|
|
@@ -14,7 +14,8 @@ export const LanguagesSelector = ({
|
|
|
14
14
|
isDisabled,
|
|
15
15
|
onChange,
|
|
16
16
|
onChangeLanguages,
|
|
17
|
-
platforms
|
|
17
|
+
platforms,
|
|
18
|
+
fitContent = false
|
|
18
19
|
}) => {
|
|
19
20
|
const [showLanguagesModal, setShowLanguagesModal] = useState(false);
|
|
20
21
|
const lang = useLang();
|
|
@@ -30,7 +31,7 @@ export const LanguagesSelector = ({
|
|
|
30
31
|
children: [_jsx(DropdownMenu, {
|
|
31
32
|
isScrollable: true,
|
|
32
33
|
renderHandler: handlerProps => _jsx(Button, {
|
|
33
|
-
style: {
|
|
34
|
+
style: fitContent ? undefined : {
|
|
34
35
|
minWidth: 200
|
|
35
36
|
},
|
|
36
37
|
color: "secondary",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pushwoosh/smart-components-kit",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.3.0",
|
|
4
4
|
"description": "Stateful, data-connected React components shared by Pushwoosh micro-frontends",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -17,9 +17,9 @@
|
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
19
|
"@floating-ui/react-dom": "^2.1.2",
|
|
20
|
-
"@pushwoosh/dumb-components": "^4.
|
|
20
|
+
"@pushwoosh/dumb-components": "^4.11.0",
|
|
21
21
|
"@pushwoosh/kit-constants": "^3.0.0",
|
|
22
|
-
"@pushwoosh/kit-helpers": "^4.16.
|
|
22
|
+
"@pushwoosh/kit-helpers": "^4.16.1",
|
|
23
23
|
"@pushwoosh/kit-icons": "^2.3.15",
|
|
24
24
|
"@pushwoosh/kit-typography": "^2.0.0",
|
|
25
25
|
"@pushwoosh/rpc-v2-http-api-data": "^0.2.473",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"react-hook-form": "^7.68.0"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
|
-
"@pushwoosh/frontend-builder-engine": "^4.
|
|
30
|
+
"@pushwoosh/frontend-builder-engine": "^4.3.0",
|
|
31
31
|
"@pushwoosh/spa-context": "^3.3.1",
|
|
32
32
|
"@svgr/webpack": "^8.1.0",
|
|
33
33
|
"@testing-library/dom": "^10.4.2",
|