New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@snack-uikit/info-block

Package Overview
Dependencies
Maintainers
3
Versions
98
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@snack-uikit/info-block - npm Package Compare versions

Comparing version 0.3.6 to 0.4.0

dist/contexts.d.ts

11

CHANGELOG.md

@@ -6,2 +6,13 @@ # Change Log

# 0.4.0 (2024-06-06)
### Features
* **PDS-42:** add size context to InfoBlock.Footer ([39c681a](https://github.com/cloud-ru-tech/snack-uikit/commit/39c681a045594645fb6c87cade4acd4d81e65a23))
## 0.3.6 (2024-05-30)

@@ -8,0 +19,0 @@

4

dist/components/Footer/Footer.js

@@ -5,2 +5,3 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";

import { TEST_IDS } from '../../constants';
import { useInfoBlockContext } from '../../contexts';
import { useButtonWithTooltip } from './hooks';

@@ -11,3 +12,4 @@ import styles from './styles.module.css';

const SecondaryButton = useButtonWithTooltip({ Button: ButtonTonal, tooltip: secondaryButton === null || secondaryButton === void 0 ? void 0 : secondaryButton.tooltip });
return (_jsxs("div", { className: cn(styles.infoBlockFooter, className), children: [secondaryButton && (_jsx(SecondaryButton, Object.assign({}, secondaryButton, { size: 'm', "data-test-id": secondaryButton['data-test-id'] || TEST_IDS.secondaryButton }))), _jsx(PrimaryButton, Object.assign({}, primaryButton, { size: 'm', "data-test-id": primaryButton['data-test-id'] || TEST_IDS.primaryButton }))] }));
const { size } = useInfoBlockContext();
return (_jsxs("div", { className: cn(styles.infoBlockFooter, className), children: [secondaryButton && (_jsx(SecondaryButton, Object.assign({}, secondaryButton, { size: size, "data-test-id": secondaryButton['data-test-id'] || TEST_IDS.secondaryButton }))), _jsx(PrimaryButton, Object.assign({}, primaryButton, { size: size, "data-test-id": primaryButton['data-test-id'] || TEST_IDS.primaryButton }))] }));
}

@@ -18,2 +18,3 @@ var __rest = (this && this.__rest) || function (s, e) {

import { ALIGN, SIZE, TEST_IDS } from '../../constants';
import { InfoBlockContext } from '../../contexts';
import styles from './styles.module.css';

@@ -23,3 +24,3 @@ export function InfoBlock(_a) {

var { title, description, icon, size = SIZE.S, footer, align = ALIGN.Vertical, className } = _a, rest = __rest(_a, ["title", "description", "icon", "size", "footer", "align", "className"]);
return (_jsxs("div", Object.assign({ className: cn(styles.infoBlock, className), "data-size": size, "data-align": align }, extractSupportProps(rest), { children: [icon && (_jsx(IconPredefined, { icon: icon.icon, appearance: (_b = icon.appearance) !== null && _b !== void 0 ? _b : 'primary', decor: (_c = icon.decor) !== null && _c !== void 0 ? _c : true, size: size, "data-test-id": TEST_IDS.icon })), _jsxs("div", { className: styles.contentLayout, children: [_jsxs("div", { className: styles.textWrap, children: [title && (_jsx(Typography, { family: 'sans', purpose: 'title', size: size, className: styles.title, "data-test-id": TEST_IDS.title, children: title })), description && (_jsx(Typography, { family: 'sans', purpose: 'body', size: size, className: styles.description, "data-test-id": TEST_IDS.description, children: description }))] }), footer && (_jsx("div", { className: styles.footer, "data-test-id": TEST_IDS.footer, children: footer }))] })] })));
return (_jsx(InfoBlockContext.Provider, { value: { size }, children: _jsxs("div", Object.assign({ className: cn(styles.infoBlock, className), "data-size": size, "data-align": align }, extractSupportProps(rest), { children: [icon && (_jsx(IconPredefined, { icon: icon.icon, appearance: (_b = icon.appearance) !== null && _b !== void 0 ? _b : 'primary', decor: (_c = icon.decor) !== null && _c !== void 0 ? _c : true, size: size, "data-test-id": TEST_IDS.icon })), _jsxs("div", { className: styles.contentLayout, children: [_jsxs("div", { className: styles.textWrap, children: [title && (_jsx(Typography, { family: 'sans', purpose: 'title', size: size, className: styles.title, "data-test-id": TEST_IDS.title, children: title })), description && (_jsx(Typography, { family: 'sans', purpose: 'body', size: size, className: styles.description, "data-test-id": TEST_IDS.description, children: description }))] }), footer && (_jsx("div", { className: styles.footer, "data-test-id": TEST_IDS.footer, children: footer }))] })] })) }));
}

@@ -7,3 +7,3 @@ {

"title": "Info Block",
"version": "0.3.6",
"version": "0.4.0",
"sideEffects": [

@@ -43,3 +43,3 @@ "*.css",

},
"gitHead": "6a5d30f58b1ca79c29b9f4b3078edbd8c02e15a4"
"gitHead": "0fc5480c934d08f8578e1e7d862321bc89113ca5"
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc