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

@kitconcept/volto-button-block

Package Overview
Dependencies
Maintainers
5
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@kitconcept/volto-button-block - npm Package Compare versions

Comparing version 2.2.0 to 2.3.0

.yarn/cache/@octokit-auth-token-npm-3.0.3-6fba099166-9b3f569cec.zip

7

CHANGELOG.md

@@ -11,2 +11,9 @@ # kitconcept's volto-button-block Release Notes

## 2.3.0 (2023-06-23)
### Feature
- Add new Feature Button opens in new window @iRohitSingh [#9](https://github.com/kitconcept/volto-export/pull/9)
## 2.2.0 (2023-06-06)

@@ -13,0 +20,0 @@

2

package.json
{
"name": "@kitconcept/volto-button-block",
"version": "2.2.0",
"version": "2.3.0",
"description": "volto-button-block: Volto add-on that provides a configurable button as a block.",

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

@@ -24,2 +24,6 @@ import { defineMessages } from 'react-intl';

},
openLinkInNewTab: {
id: 'Open in a new tab',
defaultMessage: 'Open in a new tab',
},
});

@@ -36,3 +40,3 @@

title: 'Default',
fields: ['title', 'href', 'inneralign'],
fields: ['title', 'href', 'openLinkInNewTab', 'inneralign'],
},

@@ -57,2 +61,6 @@ ],

},
openLinkInNewTab: {
title: intl.formatMessage(messages.openLinkInNewTab),
type: 'boolean',
},
},

@@ -59,0 +67,0 @@ required: [],

@@ -5,3 +5,2 @@ import React from 'react';

import { ConditionalLink } from '@plone/volto/components';
import { flattenToAppURL, isInternalURL } from '@plone/volto/helpers';
import { defineMessages, useIntl } from 'react-intl';

@@ -34,6 +33,7 @@

let link = hasLink ? (
data.href.length > 0 && isInternalURL(data.href[0]['@id']) ? (
data.href.length > 0 && (
<ConditionalLink
to={data.href.length > 0 ? flattenToAppURL(data.href[0]['@id']) : ''}
to={data.href[0]?.['@id']}
condition={!isEditMode}
openLinkInNewTab={data.openLinkInNewTab}
>

@@ -44,10 +44,2 @@ <Button className={(cx('button'), data.align)}>

</ConditionalLink>
) : (
data.href.length > 0 && (
<a href={flattenToAppURL(data.href[0]['@id'])}>
<Button className={(cx('button'), data.align)}>
{data.title || intl.formatMessage(messages.ButtonText)}
</Button>
</a>
)
)

@@ -54,0 +46,0 @@ ) : (

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