@chakra-ui/button
Advanced tools
Comparing version 1.0.0-next.3 to 1.0.0-next.4
@@ -6,2 +6,22 @@ # Change Log | ||
# 1.0.0-next.4 (2020-07-01) | ||
### Bug Fixes | ||
- button ignores `type` prop when `as` prop is used | ||
([ba60c8b](https://github.com/chakra-ui/chakra-ui/commit/ba60c8b22930eade8f2f0c6f6884e8121a0cae5c)) | ||
- **button:** remove negative margin on icons | ||
([4ed6c4b](https://github.com/chakra-ui/chakra-ui/commit/4ed6c4bc0699c1054fdd27985e1bc931a99ae055)) | ||
- [#891](https://github.com/chakra-ui/chakra-ui/issues/891) | ||
([e107acc](https://github.com/chakra-ui/chakra-ui/commit/e107acc8487898a965b0d695c1da71f46fc56d5e)) | ||
- force uppercase package directories to lowercase | ||
([3704992](https://github.com/chakra-ui/chakra-ui/commit/370499278a526e37bc6ac7d2bc30879425441f46)) | ||
- ts issue with sx prop | ||
([d3b1340](https://github.com/chakra-ui/chakra-ui/commit/d3b1340cb255937927b4d4c56ce218141570b951)) | ||
# Change Log | ||
All notable changes to this project will be documented in this file. See | ||
[Conventional Commits](https://conventionalcommits.org) for commit guidelines. | ||
# 1.0.0-next.3 (2020-06-28) | ||
@@ -8,0 +28,0 @@ |
@@ -64,3 +64,4 @@ "use strict"; | ||
className = props.className, | ||
rest = _objectWithoutPropertiesLoose(props, ["isDisabled", "isLoading", "isActive", "isFullWidth", "children", "leftIcon", "rightIcon", "loadingText", "iconSpacing", "type", "spinner", "variant", "colorScheme", "size", "className"]); | ||
as = props.as, | ||
rest = _objectWithoutPropertiesLoose(props, ["isDisabled", "isLoading", "isActive", "isFullWidth", "children", "leftIcon", "rightIcon", "loadingText", "iconSpacing", "type", "spinner", "variant", "colorScheme", "size", "className", "as"]); | ||
@@ -91,3 +92,4 @@ var styles = (0, _system.useComponentStyle)({ | ||
ref: ref, | ||
type: type, | ||
as: as, | ||
type: as ? undefined : type, | ||
width: isFullWidth ? "100%" : undefined, | ||
@@ -103,3 +105,2 @@ "data-active": (0, _utils.dataAttr)(isActive), | ||
}, rest), leftIcon && !isLoading && /*#__PURE__*/React.createElement(ButtonIcon, { | ||
ml: -1, | ||
mr: iconSpacing, | ||
@@ -116,3 +117,2 @@ children: leftIcon | ||
ml: iconSpacing, | ||
mr: -1, | ||
children: rightIcon | ||
@@ -119,0 +119,0 @@ })); |
@@ -45,5 +45,6 @@ function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } | ||
size = group == null ? void 0 : group.size, | ||
className | ||
className, | ||
as | ||
} = props, | ||
rest = _objectWithoutPropertiesLoose(props, ["isDisabled", "isLoading", "isActive", "isFullWidth", "children", "leftIcon", "rightIcon", "loadingText", "iconSpacing", "type", "spinner", "variant", "colorScheme", "size", "className"]); | ||
rest = _objectWithoutPropertiesLoose(props, ["isDisabled", "isLoading", "isActive", "isFullWidth", "children", "leftIcon", "rightIcon", "loadingText", "iconSpacing", "type", "spinner", "variant", "colorScheme", "size", "className", "as"]); | ||
@@ -74,3 +75,4 @@ var styles = useComponentStyle({ | ||
ref: ref, | ||
type: type, | ||
as: as, | ||
type: as ? undefined : type, | ||
width: isFullWidth ? "100%" : undefined, | ||
@@ -86,3 +88,2 @@ "data-active": dataAttr(isActive), | ||
}, rest), leftIcon && !isLoading && /*#__PURE__*/React.createElement(ButtonIcon, { | ||
ml: -1, | ||
mr: iconSpacing, | ||
@@ -99,3 +100,2 @@ children: leftIcon | ||
ml: iconSpacing, | ||
mr: -1, | ||
children: rightIcon | ||
@@ -102,0 +102,0 @@ })); |
{ | ||
"name": "@chakra-ui/button", | ||
"version": "1.0.0-next.3", | ||
"version": "1.0.0-next.4", | ||
"description": "A React component that is a base button.", | ||
@@ -51,13 +51,13 @@ "keywords": [ | ||
"devDependencies": { | ||
"@chakra-ui/system": "^1.0.0-next.3" | ||
"@chakra-ui/system": "^1.0.0-next.4" | ||
}, | ||
"dependencies": { | ||
"@chakra-ui/spinner": "^1.0.0-next.3", | ||
"@chakra-ui/utils": "^1.0.0-next.3" | ||
"@chakra-ui/spinner": "^1.0.0-next.4", | ||
"@chakra-ui/utils": "^1.0.0-next.4" | ||
}, | ||
"peerDependencies": { | ||
"@chakra-ui/system": "1.x", | ||
"@chakra-ui/system": ">0.8", | ||
"react": "16.x" | ||
}, | ||
"gitHead": "d31ba9c35993985f49da4885dd47ab8dab49cdd1" | ||
"gitHead": "cdd5eac1db90ba33a07c009fb8dbcc4453d6ec01" | ||
} |
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
82414
915
+ Added@chakra-ui/anatomy@2.2.2(transitive)
+ Added@chakra-ui/color-mode@2.2.0(transitive)
+ Added@chakra-ui/object-utils@2.1.0(transitive)
+ Added@chakra-ui/react-use-safe-layout-effect@2.1.0(transitive)
+ Added@chakra-ui/react-utils@2.0.12(transitive)
+ Added@chakra-ui/shared-utils@2.0.5(transitive)
+ Added@chakra-ui/styled-system@2.9.2(transitive)
+ Added@chakra-ui/system@2.6.2(transitive)
+ Added@chakra-ui/theme@3.3.1(transitive)
+ Added@chakra-ui/theme-tools@2.1.2(transitive)
+ Added@chakra-ui/theme-utils@2.0.21(transitive)
+ Added@chakra-ui/utils@2.0.15(transitive)
+ Added@types/lodash.mergewith@4.6.7(transitive)
+ Addedcolor2k@2.0.3(transitive)
+ Addedcsstype@3.1.3(transitive)
+ Addedframesync@6.1.2(transitive)
+ Addedreact@18.3.1(transitive)
+ Addedreact-fast-compare@3.2.2(transitive)
+ Addedtslib@2.4.0(transitive)
- Removed@chakra-ui/color-mode@1.4.8(transitive)
- Removed@chakra-ui/hooks@1.9.1(transitive)
- Removed@chakra-ui/react-env@1.1.6(transitive)
- Removed@chakra-ui/react-utils@1.2.3(transitive)
- Removed@chakra-ui/styled-system@1.19.0(transitive)
- Removed@chakra-ui/system@1.12.1(transitive)
- Removedcompute-scroll-into-view@1.0.14(transitive)
- Removedcopy-to-clipboard@3.3.1(transitive)
- Removedcsstype@3.0.9(transitive)
- Removedreact-fast-compare@3.2.0(transitive)
- Removedtoggle-selection@1.0.6(transitive)