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

@blb-ventures/react-flat-list

Package Overview
Dependencies
Maintainers
1
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@blb-ventures/react-flat-list - npm Package Compare versions

Comparing version 0.8.1 to 0.9.0

1

lib/flat-list-item.d.ts

@@ -35,3 +35,4 @@ import { FC, FunctionComponent, ReactNode } from 'react';

}> | string;
containerProps?: Partial<JSX.IntrinsicElements['div']>;
}
export declare const FlatListItem: FC<FlatListItemProps>;

4

lib/flat-list-item.js

@@ -6,3 +6,3 @@ "use strict";

const link_wrapper_1 = require("./link-wrapper");
const FlatListItem = ({ title, className, contentClassName = 'flat-list-item-content', actionIcon, imageLeft, imageLeftOptions, imageRight, imageRightOptions, onClick, left, leftOptions, right, rightOptions, center, subtitleLeft, subtitleRight, url, urlIsExternal, height = '56px', LinkComponent, component, }) => {
const FlatListItem = ({ title, className, contentClassName = 'flat-list-item-content', actionIcon, imageLeft, imageLeftOptions, imageRight, imageRightOptions, onClick, left, leftOptions, right, rightOptions, center, subtitleLeft, subtitleRight, url, urlIsExternal, height = '56px', LinkComponent, component, containerProps, }) => {
var _a, _b, _c, _d;

@@ -13,5 +13,5 @@ const hasAction = onClick != null || url != null;

const Component = component !== null && component !== void 0 ? component : 'li';
const el = ((0, jsx_runtime_1.jsxs)("div", Object.assign({ className: contentClassName, style: { height } }, { children: [(0, jsx_runtime_1.jsxs)("div", Object.assign({ className: `flat-list-item-content-left ${(_a = leftOptions === null || leftOptions === void 0 ? void 0 : leftOptions.className) !== null && _a !== void 0 ? _a : ''}`, style: leftOptions === null || leftOptions === void 0 ? void 0 : leftOptions.style }, { children: [left, typeof imageLeft === 'string' ? ((0, jsx_runtime_1.jsx)("img", Object.assign({}, imageLeftOptions, { alt: (_b = imageLeftOptions === null || imageLeftOptions === void 0 ? void 0 : imageLeftOptions.alt) !== null && _b !== void 0 ? _b : '', src: imageLeft }))) : (imageLeft), (0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "flat-list-item-content-left-text-container" }, { children: [typeof title === 'string' ? ((0, jsx_runtime_1.jsx)("div", Object.assign({ className: "flat-list-item-content-left-title" }, { children: title }))) : (title), typeof subtitleLeft === 'string' ? ((0, jsx_runtime_1.jsx)("div", Object.assign({ className: "flat-list-item-content-left-subtitle" }, { children: subtitleLeft }))) : (subtitleLeft)] }))] })), center, hasRight && ((0, jsx_runtime_1.jsxs)("div", Object.assign({ className: `flat-list-item-content-right ${(_c = rightOptions === null || rightOptions === void 0 ? void 0 : rightOptions.className) !== null && _c !== void 0 ? _c : ''}`, style: rightOptions === null || rightOptions === void 0 ? void 0 : rightOptions.style }, { children: [typeof imageRight === 'string' ? ((0, jsx_runtime_1.jsx)("img", Object.assign({}, imageRightOptions, { alt: (_d = imageLeftOptions === null || imageLeftOptions === void 0 ? void 0 : imageLeftOptions.alt) !== null && _d !== void 0 ? _d : '', src: imageRight }))) : (imageRight), typeof subtitleRight === 'string' ? ((0, jsx_runtime_1.jsx)("div", Object.assign({ className: "flat-list-item-content-right-subtitle" }, { children: subtitleRight }))) : (subtitleRight), right, hasActionIcon && ((0, jsx_runtime_1.jsx)("div", Object.assign({ className: "flat-list-item-content-right-action-icon" }, { children: actionIcon })))] })))] })));
const el = ((0, jsx_runtime_1.jsxs)("div", Object.assign({}, containerProps, { className: contentClassName, style: { height } }, { children: [(0, jsx_runtime_1.jsxs)("div", Object.assign({ className: `flat-list-item-content-left ${(_a = leftOptions === null || leftOptions === void 0 ? void 0 : leftOptions.className) !== null && _a !== void 0 ? _a : ''}`, style: leftOptions === null || leftOptions === void 0 ? void 0 : leftOptions.style }, { children: [left, typeof imageLeft === 'string' ? ((0, jsx_runtime_1.jsx)("img", Object.assign({}, imageLeftOptions, { alt: (_b = imageLeftOptions === null || imageLeftOptions === void 0 ? void 0 : imageLeftOptions.alt) !== null && _b !== void 0 ? _b : '', src: imageLeft }))) : (imageLeft), (0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "flat-list-item-content-left-text-container" }, { children: [typeof title === 'string' ? ((0, jsx_runtime_1.jsx)("div", Object.assign({ className: "flat-list-item-content-left-title" }, { children: title }))) : (title), typeof subtitleLeft === 'string' ? ((0, jsx_runtime_1.jsx)("div", Object.assign({ className: "flat-list-item-content-left-subtitle" }, { children: subtitleLeft }))) : (subtitleLeft)] }))] })), center, hasRight && ((0, jsx_runtime_1.jsxs)("div", Object.assign({ className: `flat-list-item-content-right ${(_c = rightOptions === null || rightOptions === void 0 ? void 0 : rightOptions.className) !== null && _c !== void 0 ? _c : ''}`, style: rightOptions === null || rightOptions === void 0 ? void 0 : rightOptions.style }, { children: [typeof imageRight === 'string' ? ((0, jsx_runtime_1.jsx)("img", Object.assign({}, imageRightOptions, { alt: (_d = imageLeftOptions === null || imageLeftOptions === void 0 ? void 0 : imageLeftOptions.alt) !== null && _d !== void 0 ? _d : '', src: imageRight }))) : (imageRight), typeof subtitleRight === 'string' ? ((0, jsx_runtime_1.jsx)("div", Object.assign({ className: "flat-list-item-content-right-subtitle" }, { children: subtitleRight }))) : (subtitleRight), right, hasActionIcon && ((0, jsx_runtime_1.jsx)("div", Object.assign({ className: "flat-list-item-content-right-action-icon" }, { children: actionIcon })))] })))] })));
return ((0, jsx_runtime_1.jsx)(Component, Object.assign({ className: `flat-list-item ${hasAction ? ' flat-list-item-with-action' : ''} ${className !== null && className !== void 0 ? className : ''}`, onClick: onClick }, { children: (0, jsx_runtime_1.jsx)(link_wrapper_1.LinkWrapper, Object.assign({ isExternal: urlIsExternal, LinkComponent: LinkComponent, url: url }, { children: el })) })));
};
exports.FlatListItem = FlatListItem;
{
"name": "@blb-ventures/react-flat-list",
"version": "0.8.1",
"version": "0.9.0",
"description": "",

@@ -5,0 +5,0 @@ "main": "./lib/index.js",

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