Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@hashicorp/react-vertical-text-block-list

Package Overview
Dependencies
Maintainers
15
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@hashicorp/react-vertical-text-block-list - npm Package Compare versions

Comparing version 1.0.0 to 1.1.0

29

dist/index.js

@@ -7,2 +7,3 @@ 'use strict';

var marked = _interopDefault(require('marked'));
var LinkWrap = _interopDefault(require('@hashicorp/react-link-wrap'));

@@ -12,3 +13,3 @@ function VerticalTextBlockList(_ref) {

centerText = _ref.centerText,
LinkWrapper = _ref.LinkWrapper;
Link = _ref.Link;
return React.createElement("div", {

@@ -23,3 +24,3 @@ className: "g-vertical-text-block-list"

link: item.linkUrl,
LinkWrapper: LinkWrapper
Link: Link
}, React.createElement("div", {

@@ -41,22 +42,10 @@ className: "header"

var link = _ref2.link,
LinkWrapper = _ref2.LinkWrapper,
LinkComponent = _ref2.LinkComponent,
children = _ref2.children;
if (link && LinkWrapper) {
return React.createElement(LinkWrapper, {
href: link
}, React.createElement("a", {
className: "wrapper"
}, children));
}
if (link) {
return React.createElement("a", {
className: "wrapper",
href: link
}, children);
}
return React.createElement("div", {
return link ? React.createElement(LinkWrap, {
Link: LinkComponent,
href: link,
className: "wrapper"
}, children) : React.createElement("div", {
className: "wrapper"
}, children);

@@ -63,0 +52,0 @@ }

import React from 'react'
import marked from 'marked'
import LinkWrap from '@hashicorp/react-link-wrap'
export default function VerticalTextBlockList({
data,
centerText,
LinkWrapper
}) {
export default function VerticalTextBlockList({ data, centerText, Link }) {
return (

@@ -14,3 +11,3 @@ <div className="g-vertical-text-block-list">

<li key={item.body}>
<MaybeLink link={item.linkUrl} LinkWrapper={LinkWrapper}>
<MaybeLink link={item.linkUrl} Link={Link}>
<div className="header">

@@ -37,20 +34,10 @@ {item.logo ? (

function MaybeLink({ link, LinkWrapper, children }) {
if (link && LinkWrapper) {
return (
<LinkWrapper href={link}>
<a className="wrapper">{children}</a>
</LinkWrapper>
)
}
if (link) {
return (
<a className="wrapper" href={link}>
{children}
</a>
)
}
return <div className="wrapper">{children}</div>
function MaybeLink({ link, LinkComponent, children }) {
return link ? (
<LinkWrap Link={LinkComponent} href={link} className="wrapper">
{children}
</LinkWrap>
) : (
<div className="wrapper">{children}</div>
)
}
{
"name": "@hashicorp/react-vertical-text-block-list",
"description": "Vertical block list of links",
"version": "1.0.0",
"version": "1.1.0",
"author": "Hashicorp - Mike Wickett",
"dependencies": {
"@hashicorp/react-link-wrap": "^0.0.2",
"marked": "^0.7.0"

@@ -20,3 +21,3 @@ },

},
"gitHead": "032ccd478ca16b2fb5139c43a579c086ac4d7885"
"gitHead": "9c3202beb5f05019e7ef1e2ae76c4ca9eb2709b2"
}

@@ -51,3 +51,3 @@ const props = {}

header: 'This is a header',
body: 'This is some body text to display'
body: 'This is some body text to display wow'
}

@@ -54,0 +54,0 @@ ]

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