@cloud-ru/uikit-product-quota 2.1.2 → 2.1.3-preview-2b33e371.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.
|
@@ -13,5 +13,6 @@ const typography_1 = require("@snack-uikit/typography");
|
|
|
13
13
|
const styles_module_scss_1 = __importDefault(require('./styles.module.css'));
|
|
14
14
|
function ProjectHeader({ projectName, quotasUrl, canEditQuota, isError, onIncreaseQuotaClick, hideIncreaseQuotaButton, onQuotasUrlClick, }) {
|
|
15
15
|
const { t } = (0, uikit_product_locale_1.useLocale)('Quota');
|
|
16
|
-
|
|
16
|
+
const widgetTitle = /[А-Яа-яЁё]/.test(projectName) ? 'widgetTitle.quotes' : 'widgetTitle.noQuotes';
|
|
17
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: styles_module_scss_1.default.header, children: [(0, jsx_runtime_1.jsxs)("div", { className: styles_module_scss_1.default.projectWrapper, children: [(0, jsx_runtime_1.jsx)(uikit_product_title_clickable_1.TitleClickable, { title: t(widgetTitle, { project: projectName }), href: quotasUrl, target: '_blank', icon: uikit_product_icons_1.QuotaSVG, onClick: onQuotasUrlClick }), (0, jsx_runtime_1.jsx)(typography_1.Typography.SansBodyS, { className: styles_module_scss_1.default.subtitle, children: t('widgetSubtitle') })] }), canEditQuota && !isError && !hideIncreaseQuotaButton && ((0, jsx_runtime_1.jsx)(button_1.ButtonOutline, { appearance: 'neutral', label: t('increaseQuota'), size: 's', onClick: onIncreaseQuotaClick }))] }));
|
|
17
18
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { QuotaSVG } from '@cloud-ru/uikit-product-icons';
|
|
3
3
|
import { useLocale } from '@cloud-ru/uikit-product-locale';
|
|
4
4
|
import { TitleClickable } from '@cloud-ru/uikit-product-title-clickable';
|
|
5
5
|
import { ButtonOutline } from '@snack-uikit/button';
|
|
@@ -7,5 +7,6 @@ import { Typography } from '@snack-uikit/typography';
|
|
|
7
7
|
import styles from './styles.module.css';
|
|
8
8
|
export function ProjectHeader({ projectName, quotasUrl, canEditQuota, isError, onIncreaseQuotaClick, hideIncreaseQuotaButton, onQuotasUrlClick, }) {
|
|
9
9
|
const { t } = useLocale('Quota');
|
|
10
|
-
|
|
10
|
+
const widgetTitle = /[А-Яа-яЁё]/.test(projectName) ? 'widgetTitle.quotes' : 'widgetTitle.noQuotes';
|
|
11
|
+
return (_jsxs("div", { className: styles.header, children: [_jsxs("div", { className: styles.projectWrapper, children: [_jsx(TitleClickable, { title: t(widgetTitle, { project: projectName }), href: quotasUrl, target: '_blank', icon: QuotaSVG, onClick: onQuotasUrlClick }), _jsx(Typography.SansBodyS, { className: styles.subtitle, children: t('widgetSubtitle') })] }), canEditQuota && !isError && !hideIncreaseQuotaButton && (_jsx(ButtonOutline, { appearance: 'neutral', label: t('increaseQuota'), size: 's', onClick: onIncreaseQuotaClick }))] }));
|
|
11
12
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloud-ru/uikit-product-quota",
|
|
3
3
|
"title": "Quota",
|
|
4
|
-
"version": "2.1.
|
|
4
|
+
"version": "2.1.3-preview-2b33e371.0",
|
|
5
5
|
"sideEffects": [
|
|
6
6
|
"*.css",
|
|
7
7
|
"*.woff",
|
|
@@ -56,5 +56,5 @@
|
|
|
56
56
|
"peerDependencies": {
|
|
57
57
|
"@cloud-ru/uikit-product-locale": "*"
|
|
58
58
|
},
|
|
59
|
-
"gitHead": "
|
|
59
|
+
"gitHead": "73ac495cf7a93b4b0fad24a9dde55da9409dd560"
|
|
60
60
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { QuotaSVG } from '@cloud-ru/uikit-product-icons';
|
|
2
2
|
import { useLocale } from '@cloud-ru/uikit-product-locale';
|
|
3
3
|
import { TitleClickable } from '@cloud-ru/uikit-product-title-clickable';
|
|
4
4
|
import { ButtonOutline } from '@snack-uikit/button';
|
|
@@ -26,14 +26,16 @@ export function ProjectHeader({
|
|
|
26
26
|
}: ProjectHeaderProps) {
|
|
27
27
|
const { t } = useLocale('Quota');
|
|
28
28
|
|
|
29
|
+
const widgetTitle = /[А-Яа-яЁё]/.test(projectName) ? 'widgetTitle.quotes' : 'widgetTitle.noQuotes';
|
|
30
|
+
|
|
29
31
|
return (
|
|
30
32
|
<div className={styles.header}>
|
|
31
33
|
<div className={styles.projectWrapper}>
|
|
32
34
|
<TitleClickable
|
|
33
|
-
title={projectName}
|
|
35
|
+
title={t(widgetTitle, { project: projectName })}
|
|
34
36
|
href={quotasUrl}
|
|
35
37
|
target='_blank'
|
|
36
|
-
icon={
|
|
38
|
+
icon={QuotaSVG}
|
|
37
39
|
onClick={onQuotasUrlClick}
|
|
38
40
|
/>
|
|
39
41
|
|