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

terra-button

Package Overview
Dependencies
Maintainers
10
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 2.0.1 to 2.1.0

tests/wdio/__snapshots__/reference/chrome/Neutral[--terra-button-font-size].470x768.png

16

CHANGELOG.md

@@ -7,2 +7,18 @@ Changelog

2.1.0 - (February 26, 2018)
------------------
### Changed
* Added font-size theming variable to Button component
* Corrected `DE-EMPHSASIS` button variant typo
2.0.1 - (February 13, 2018)
------------------
### Changed
* Updated peerDependencies
2.0.0 - (February 23, 2018)
----------
### Changed
* Updated button types and variants syntax in docs
2.0.0 - (February 12, 2018)

@@ -9,0 +25,0 @@ ------------------

2

docs/DEPENDENCIES.md

@@ -20,2 +20,2 @@ # Dependency Information

| react-dom | ^16.2.0 | ^16.0.0 | React package for working with the DOM. |
| terra-base | ^2.8.0 | ^16.2.0 | The base component sets minimal global styles for an application. |
| terra-base | ^3.0.0 | ^16.2.0 | The base component sets minimal global styles for an application. |

@@ -16,4 +16,4 @@ ## Button Props Table

| onKeyUp| `func`| optional| | Callback function triggered when key is released.|
| text| `string`| `required`| | Sets the button text. If the button `isIconOnly` or of variant `ButtonVariants.UTILITY`, this text is set as the aria-label for accessibility.|
| type| `string`| optional| `'button'`| Sets the button type. One of `ButtonTypes.BUTTON`, `ButtonTypes.SUBMIT`, or `ButtonTypes.RESET`.|
| variant| `string`| optional| `'neutral'`| Sets the button variant. One of `ButtonVariants.NEUTRAL`, `ButtonVariants.EMPHASIS`, `ButtonVariants['DE-EMPSHASIS']`, `ButtonVariants.ACTION` or `ButtonVariants.UTILITY`.|
| text| `string`| `required`| | Sets the button text. If the button `isIconOnly` or of variant `Button.Opts.Variants.UTILITY`, this text is set as the aria-label for accessibility.|
| type| `string`| optional| `'button'`| Sets the button type. One of `Button.Opts.Types.BUTTON`, `Button.Opts.Types.SUBMIT`, or `Button.Opts.Types.RESET`.|
| variant| `string`| optional| `'neutral'`| Sets the button variant. One of `Button.Opts.Variants.NEUTRAL`, `Button.Opts.Variants.EMPHASIS`, `Button.Opts.Variants['DE-EMPHASIS']`, `Button.Opts.Variants.ACTION` or `Button.Opts.Variants.UTILITY`.|

@@ -50,3 +50,5 @@ 'use strict';

EMPHASIS: 'emphasis',
'DE-EMPSHASIS': 'de-emphasis',
// TODO: this should be removed on the next major version bump
'DE-EMPHSASIS': 'de-emphasis',
'DE-EMPHASIS': 'de-emphasis',
ACTION: 'action',

@@ -112,13 +114,13 @@ UTILITY: 'utility'

/**
* Sets the button text. If the button `isIconOnly` or of variant `ButtonVariants.UTILITY`, this text is set as the aria-label for accessibility.
* Sets the button text. If the button `isIconOnly` or of variant `Button.Opts.Variants.UTILITY`, this text is set as the aria-label for accessibility.
*/
text: _propTypes2.default.string.isRequired,
/**
* Sets the button type. One of `ButtonTypes.BUTTON`, `ButtonTypes.SUBMIT`, or `ButtonTypes.RESET`.
* Sets the button type. One of `Button.Opts.Types.BUTTON`, `Button.Opts.Types.SUBMIT`, or `Button.Opts.Types.RESET`.
*/
type: _propTypes2.default.oneOf([ButtonTypes.BUTTON, ButtonTypes.SUBMIT, ButtonTypes.RESET]),
/**
* Sets the button variant. One of `ButtonVariants.NEUTRAL`, `ButtonVariants.EMPHASIS`, `ButtonVariants['DE-EMPSHASIS']`, `ButtonVariants.ACTION` or `ButtonVariants.UTILITY`.
* Sets the button variant. One of `Button.Opts.Variants.NEUTRAL`, `Button.Opts.Variants.EMPHASIS`, `Button.Opts.Variants['DE-EMPHASIS']`, `Button.Opts.Variants.ACTION` or `Button.Opts.Variants.UTILITY`.
*/
variant: _propTypes2.default.oneOf([ButtonVariants.NEUTRAL, ButtonVariants.EMPHASIS, ButtonVariants['DE-EMPSHASIS'], ButtonVariants.ACTION, ButtonVariants.UTILITY])
variant: _propTypes2.default.oneOf([ButtonVariants.NEUTRAL, ButtonVariants.EMPHASIS, ButtonVariants['DE-EMPHASIS'], ButtonVariants.ACTION, ButtonVariants.UTILITY])
};

@@ -125,0 +127,0 @@

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

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

"devDependencies": {
"terra-props-table": "^2.0.0"
"terra-props-table": "^2.1.0"
},

@@ -42,3 +42,3 @@ "peerDependencies": {

"react-dom": "^16.2.0",
"terra-base": "^3.0.0"
"terra-base": "^3.1.0"
},

@@ -48,4 +48,4 @@ "dependencies": {

"prop-types": "^15.5.8",
"terra-base": "^3.0.0"
"terra-base": "^3.1.0"
}
}

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

EMPHASIS: 'emphasis',
'DE-EMPSHASIS': 'de-emphasis',
// TODO: this should be removed on the next major version bump
'DE-EMPHSASIS': 'de-emphasis',
'DE-EMPHASIS': 'de-emphasis',
ACTION: 'action',

@@ -80,13 +82,13 @@ UTILITY: 'utility',

/**
* Sets the button text. If the button `isIconOnly` or of variant `ButtonVariants.UTILITY`, this text is set as the aria-label for accessibility.
* Sets the button text. If the button `isIconOnly` or of variant `Button.Opts.Variants.UTILITY`, this text is set as the aria-label for accessibility.
*/
text: PropTypes.string.isRequired,
/**
* Sets the button type. One of `ButtonTypes.BUTTON`, `ButtonTypes.SUBMIT`, or `ButtonTypes.RESET`.
* Sets the button type. One of `Button.Opts.Types.BUTTON`, `Button.Opts.Types.SUBMIT`, or `Button.Opts.Types.RESET`.
*/
type: PropTypes.oneOf([ButtonTypes.BUTTON, ButtonTypes.SUBMIT, ButtonTypes.RESET]),
/**
* Sets the button variant. One of `ButtonVariants.NEUTRAL`, `ButtonVariants.EMPHASIS`, `ButtonVariants['DE-EMPSHASIS']`, `ButtonVariants.ACTION` or `ButtonVariants.UTILITY`.
* Sets the button variant. One of `Button.Opts.Variants.NEUTRAL`, `Button.Opts.Variants.EMPHASIS`, `Button.Opts.Variants['DE-EMPHASIS']`, `Button.Opts.Variants.ACTION` or `Button.Opts.Variants.UTILITY`.
*/
variant: PropTypes.oneOf([ButtonVariants.NEUTRAL, ButtonVariants.EMPHASIS, ButtonVariants['DE-EMPSHASIS'], ButtonVariants.ACTION, ButtonVariants.UTILITY]),
variant: PropTypes.oneOf([ButtonVariants.NEUTRAL, ButtonVariants.EMPHASIS, ButtonVariants['DE-EMPHASIS'], ButtonVariants.ACTION, ButtonVariants.UTILITY]),
};

@@ -93,0 +95,0 @@

@@ -17,2 +17,3 @@ /* global browser, Terra, before */

'--terra-button-disabled-opacity': '.7',
'--terra-button-font-size': '50px',

@@ -19,0 +20,0 @@ // Netural Button Vars for default state

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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