avada-components-seoon 1.0.35 → 1.0.36
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AdsBannerCard.d.ts","sourceRoot":"","sources":["../../../src/components/AdsBanner/AdsBannerCard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"AdsBannerCard.d.ts","sourceRoot":"","sources":["../../../src/components/AdsBanner/AdsBannerCard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAI7C,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAoCtD,CAAC;AAEF,eAAe,aAAa,CAAC"}
|
|
@@ -1,16 +1,12 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { AppProvider, Button, Text } from '@shopify/polaris';
|
|
3
|
-
import { XSmallIcon } from '@shopify/polaris-icons';
|
|
4
3
|
const DEFAULT_HEIGHT = '150px';
|
|
5
|
-
export const AdsBannerCard = ({ data,
|
|
4
|
+
export const AdsBannerCard = ({ data, onInstallClick, height = DEFAULT_HEIGHT, }) => {
|
|
6
5
|
const handleInstallClick = () => {
|
|
7
6
|
window.open(data.url, '_blank');
|
|
8
7
|
onInstallClick?.(data.key);
|
|
9
8
|
};
|
|
10
|
-
|
|
11
|
-
onDismiss(data.key);
|
|
12
|
-
};
|
|
13
|
-
return (_jsx(AppProvider, { i18n: {}, children: _jsx("div", { className: "AC-AdsBanner__Card", style: { height }, children: _jsxs("div", { className: "AC-AdsBanner__CardContent", children: [_jsx("img", { src: data.image, alt: data.title, className: "AC-AdsBanner__Icon" }), _jsxs("div", { className: "AC-AdsBanner__Info", children: [_jsx("div", { className: "AC-AdsBanner__AppName", children: _jsx(Text, { as: "p", variant: "headingSm", fontWeight: "semibold", children: data.appName }) }), _jsx("div", { className: "AC-AdsBanner__Title", children: _jsx(Text, { as: "p", variant: "bodySm", tone: "subdued", children: data.title }) }), _jsx("div", { className: "AC-AdsBanner__ButtonGroup", children: _jsx(Button, { size: "slim", onClick: handleInstallClick, children: data.actionLabel }) })] }), _jsx("button", { type: "button", className: "AC-AdsBanner__CloseButton", onClick: handleDismiss, "aria-label": "Dismiss", children: _jsx(XSmallIcon, {}) })] }) }) }));
|
|
9
|
+
return (_jsx(AppProvider, { i18n: {}, children: _jsx("div", { className: "AC-AdsBanner__Card", style: { height }, children: _jsxs("div", { className: "AC-AdsBanner__CardContent", children: [_jsx("img", { src: data.image, alt: data.title, className: "AC-AdsBanner__Icon" }), _jsxs("div", { className: "AC-AdsBanner__Info", children: [_jsx("div", { className: "AC-AdsBanner__AppName", children: _jsx(Text, { as: "p", variant: "headingSm", fontWeight: "semibold", children: data.appName }) }), _jsx("div", { className: "AC-AdsBanner__Title", children: _jsx(Text, { as: "p", variant: "bodySm", tone: "subdued", children: data.title }) }), _jsx("div", { className: "AC-AdsBanner__ButtonGroup", children: _jsx(Button, { size: "slim", onClick: handleInstallClick, children: data.actionLabel }) })] })] }) }) }));
|
|
14
10
|
};
|
|
15
11
|
export default AdsBannerCard;
|
|
16
12
|
//# sourceMappingURL=AdsBannerCard.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AdsBannerCard.js","sourceRoot":"","sources":["../../../src/components/AdsBanner/AdsBannerCard.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"AdsBannerCard.js","sourceRoot":"","sources":["../../../src/components/AdsBanner/AdsBannerCard.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,kBA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