@astral/ui 4.1.4 → 4.1.5
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/components/Banner/BannerActionButton/BannerActionButton.d.ts +6 -1
- package/components/Banner/BannerActionButton/BannerActionButton.js +1 -4
- package/node/components/Banner/BannerActionButton/BannerActionButton.d.ts +6 -1
- package/node/components/Banner/BannerActionButton/BannerActionButton.js +1 -4
- package/package.json +1 -1
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
import type { ElementType } from 'react';
|
|
2
2
|
import { type ButtonProps } from '../../Button';
|
|
3
|
-
export type BannerActionButtonProps<TComponent extends ElementType =
|
|
3
|
+
export type BannerActionButtonProps<TComponent extends ElementType = 'button'> = Omit<ButtonProps<TComponent>, 'size' | 'fullWidth' | 'component'> & {
|
|
4
|
+
/**
|
|
5
|
+
* Тип html-элемента
|
|
6
|
+
*/
|
|
7
|
+
component?: TComponent;
|
|
8
|
+
};
|
|
4
9
|
export declare const BannerActionButton: <TComponent extends ElementType = "button">({ children, ...restProps }: BannerActionButtonProps<TComponent>) => JSX.Element;
|
|
@@ -15,8 +15,5 @@ import { useViewportType } from '../../hooks';
|
|
|
15
15
|
export const BannerActionButton = (_a) => {
|
|
16
16
|
var { children } = _a, restProps = __rest(_a, ["children"]);
|
|
17
17
|
const { isMobile } = useViewportType();
|
|
18
|
-
return (
|
|
19
|
-
// biome-ignore lint/suspicious/noTsIgnore: Проблема c вложенностью типизации. Ts теряет типизацию при большой вложенности типов
|
|
20
|
-
// @ts-ignore
|
|
21
|
-
_jsx(Button, Object.assign({}, restProps, { fullWidth: isMobile, size: "large", children: children })));
|
|
18
|
+
return (_jsx(Button, Object.assign({}, restProps, { fullWidth: isMobile, size: "large", children: children })));
|
|
22
19
|
};
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
import type { ElementType } from 'react';
|
|
2
2
|
import { type ButtonProps } from '../../Button';
|
|
3
|
-
export type BannerActionButtonProps<TComponent extends ElementType =
|
|
3
|
+
export type BannerActionButtonProps<TComponent extends ElementType = 'button'> = Omit<ButtonProps<TComponent>, 'size' | 'fullWidth' | 'component'> & {
|
|
4
|
+
/**
|
|
5
|
+
* Тип html-элемента
|
|
6
|
+
*/
|
|
7
|
+
component?: TComponent;
|
|
8
|
+
};
|
|
4
9
|
export declare const BannerActionButton: <TComponent extends ElementType = "button">({ children, ...restProps }: BannerActionButtonProps<TComponent>) => JSX.Element;
|
|
@@ -18,9 +18,6 @@ const hooks_1 = require("../../hooks");
|
|
|
18
18
|
const BannerActionButton = (_a) => {
|
|
19
19
|
var { children } = _a, restProps = __rest(_a, ["children"]);
|
|
20
20
|
const { isMobile } = (0, hooks_1.useViewportType)();
|
|
21
|
-
return (
|
|
22
|
-
// biome-ignore lint/suspicious/noTsIgnore: Проблема c вложенностью типизации. Ts теряет типизацию при большой вложенности типов
|
|
23
|
-
// @ts-ignore
|
|
24
|
-
(0, jsx_runtime_1.jsx)(Button_1.Button, Object.assign({}, restProps, { fullWidth: isMobile, size: "large", children: children })));
|
|
21
|
+
return ((0, jsx_runtime_1.jsx)(Button_1.Button, Object.assign({}, restProps, { fullWidth: isMobile, size: "large", children: children })));
|
|
25
22
|
};
|
|
26
23
|
exports.BannerActionButton = BannerActionButton;
|