@entur/button
Advanced tools
Comparing version 0.2.1 to 1.0.0
@@ -6,2 +6,12 @@ # Change Log | ||
# [1.0.0](https://bitbucket.org/enturas/design-system/compare/@entur/button@0.2.1...@entur/button@1.0.0) (2019-10-11) | ||
### Bug Fixes | ||
- size property is proper height ([b8d88d2](https://bitbucket.org/enturas/design-system/commits/b8d88d2)) | ||
### BREAKING CHANGES | ||
- Width=medium|large removed | ||
## [0.2.1](https://bitbucket.org/enturas/design-system/compare/@entur/button@0.2.0...@entur/button@0.2.1) (2019-10-07) | ||
@@ -8,0 +18,0 @@ |
@@ -31,4 +31,3 @@ 'use strict'; | ||
size = _ref$size === void 0 ? 'medium' : _ref$size, | ||
_ref$loading = _ref.loading, | ||
loading = _ref$loading === void 0 ? false : _ref$loading, | ||
loading = _ref.loading, | ||
className = _ref.className, | ||
@@ -51,3 +50,5 @@ children = _ref.children, | ||
disabled: disabled | ||
}, rest), children); | ||
}, rest), loading ? React.createElement("div", { | ||
className: "spinner" | ||
}) : children); | ||
}); | ||
@@ -54,0 +55,0 @@ |
@@ -1,2 +0,2 @@ | ||
"use strict";function t(t){return t&&"object"==typeof t&&"default"in t?t.default:t}var e=t(require("react")),n=t(require("classnames"));exports.Button=e.forwardRef(function(t,a){var i,r=t.variant,u=t.size,d=void 0===u?"medium":u,o=t.loading,s=void 0!==o&&o,l=t.className,c=t.children,b=t.disabled,v=void 0!==b&&b,f=t.width,m=t.active,h=t.as,g=void 0===h?"button":h,w=function(t,e){if(null==t)return{};var n,a,i={},r=Object.keys(t);for(a=0;a<r.length;a++)e.indexOf(n=r[a])>=0||(i[n]=t[n]);return i}(t,["variant","size","loading","className","children","disabled","width","active","as"]),j=n("entur-button",((i={})["entur-button--variant-"+r]=r,i["entur-button--size-"+d]=d,i["entur-button--width-"+f]=f,i["entur-button--active"]=m,i["entur-button--disabled"]=v,i["entur-button--loading"]=s,i),l);return e.createElement(v?"button":g,Object.assign({className:j,ref:a,"aria-busy":s,disabled:v},w),c)}); | ||
"use strict";function t(t){return t&&"object"==typeof t&&"default"in t?t.default:t}var e=t(require("react")),n=t(require("classnames"));exports.Button=e.forwardRef(function(t,a){var i,r=t.variant,u=t.size,s=void 0===u?"medium":u,d=t.loading,o=t.className,l=t.children,c=t.disabled,b=void 0!==c&&c,v=t.width,f=t.active,m=t.as,h=void 0===m?"button":m,g=function(t,e){if(null==t)return{};var n,a,i={},r=Object.keys(t);for(a=0;a<r.length;a++)e.indexOf(n=r[a])>=0||(i[n]=t[n]);return i}(t,["variant","size","loading","className","children","disabled","width","active","as"]),w=n("entur-button",((i={})["entur-button--variant-"+r]=r,i["entur-button--size-"+s]=s,i["entur-button--width-"+v]=v,i["entur-button--active"]=f,i["entur-button--disabled"]=b,i["entur-button--loading"]=d,i),o);return e.createElement(b?"button":h,Object.assign({className:w,ref:a,"aria-busy":d,disabled:b},g),d?e.createElement("div",{className:"spinner"}):l)}); | ||
//# sourceMappingURL=button.cjs.production.min.js.map |
@@ -27,4 +27,3 @@ import React from 'react'; | ||
size = _ref$size === void 0 ? 'medium' : _ref$size, | ||
_ref$loading = _ref.loading, | ||
loading = _ref$loading === void 0 ? false : _ref$loading, | ||
loading = _ref.loading, | ||
className = _ref.className, | ||
@@ -47,3 +46,5 @@ children = _ref.children, | ||
disabled: disabled | ||
}, rest), children); | ||
}, rest), loading ? React.createElement("div", { | ||
className: "spinner" | ||
}) : children); | ||
}); | ||
@@ -50,0 +51,0 @@ |
@@ -5,3 +5,3 @@ import React from 'react'; | ||
declare type variants = 'primary' | 'secondary' | 'success' | 'negative'; | ||
declare type widths = 'medium' | 'large' | 'fluid' | 'square'; | ||
declare type widths = 'fluid' | 'square'; | ||
declare type ButtonProps = { | ||
@@ -8,0 +8,0 @@ variant: variants; |
{ | ||
"name": "@entur/button", | ||
"version": "0.2.1", | ||
"version": "1.0.0", | ||
"license": "EUPL-1.2", | ||
@@ -34,4 +34,3 @@ "main": "dist/index.js", | ||
"@entur/tokens": "^0.2.0" | ||
}, | ||
"gitHead": "831e395503aa7f4a5703f452eb4df97140f961e8" | ||
} | ||
} |
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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
14
256
2
17830
1