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

terra-button

Package Overview
Dependencies
Maintainers
7
Versions
146
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

terra-button - npm Package Compare versions

Comparing version 3.63.0 to 3.64.0

5

CHANGELOG.md

@@ -5,2 +5,7 @@ # Changelog

## 3.64.0 - (February 16, 2023)
* Changed
* Fixed aria-label bug.
## 3.63.0 - (February 15, 2023)

@@ -7,0 +12,0 @@

6

lib/Button.js

@@ -338,5 +338,5 @@ "use strict";

// ignore aria-label for button with decorative icons.
var ariaLabel = iconType !== IconTypes.DECORATIVE ? customProps['aria-label'] : undefined;
if ((isIconOnly || variant === 'utility') && iconType === IconTypes.INFORMATIVE) {
ariaLabel = ariaLabel || text;
var ariaLabel = customProps['aria-label'];
if (isIconOnly || variant === 'utility') {
ariaLabel = iconType === IconTypes.INFORMATIVE ? ariaLabel || text : undefined;
}

@@ -343,0 +343,0 @@ var ComponentType = 'button';

{
"name": "terra-button",
"main": "lib/Button.js",
"version": "3.63.0",
"version": "3.64.0",
"description": "The terra-button component provides users a way to trigger actions in the UI.",

@@ -47,3 +47,3 @@ "repository": {

},
"gitHead": "632d9cecc4c480d250ddef2ee6999349eda97641"
"gitHead": "76b62237054bafffe2e51240370bc7cd0cf6df81"
}

@@ -311,5 +311,5 @@ import React from 'react';

// ignore aria-label for button with decorative icons.
let ariaLabel = (iconType !== IconTypes.DECORATIVE) ? customProps['aria-label'] : undefined;
if ((isIconOnly || variant === 'utility') && iconType === IconTypes.INFORMATIVE) {
ariaLabel = ariaLabel || text;
let ariaLabel = customProps['aria-label'];
if (isIconOnly || variant === 'utility') {
ariaLabel = (iconType === IconTypes.INFORMATIVE) ? ariaLabel || text : undefined;
}

@@ -316,0 +316,0 @@

import React from 'react';
import ThemeContextProvider from 'terra-theme-context/lib/ThemeContextProvider';
import Button from '../../src/Button';
import Button, { IconTypes } from '../../src/Button';

@@ -52,5 +52,5 @@ // Snapshot Tests

it('should render an icon', () => {
it('should render an informative icon button', () => {
const testElement = <img alt="icon" />;
const button = shallow(<Button icon={testElement} isIconOnly text="isIconOnly" />);
const button = shallow(<Button iconType={IconTypes.INFORMATIVE} icon={testElement} isIconOnly text="isIconOnly" />);
expect(button).toMatchSnapshot();

@@ -57,0 +57,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