@igloo-ui/icon-button
Advanced tools
Comparing version 0.2.9 to 0.2.10
@@ -5,2 +5,3 @@ import * as React from 'react'; | ||
export declare type Size = 'xsmall' | 'small' | 'medium' | 'large'; | ||
export declare type Ref = HTMLButtonElement; | ||
export interface IconButtonProps extends Omit<ButtonOwnProps, 'size'> { | ||
@@ -7,0 +8,0 @@ /** Add class names to the surrounding DOM container. */ |
@@ -187,3 +187,3 @@ import './icon-button.css'; | ||
return { | ||
[`ids-btn--${appearance.type}`]: appearance.type, | ||
[`ids-btn--${appearance.type}`]: !appearance.variant, | ||
[`ids-btn--${appearance.type}-${appearance.variant}`]: appearance.variant, | ||
@@ -223,3 +223,3 @@ }; | ||
const IconButton = (props) => { | ||
const IconButton = React.forwardRef((props, ref) => { | ||
const { className, icon, onClick, disabled = false, size = 'medium', rounded = false, dataTest } = props, rest = __rest$1(props, ["className", "icon", "onClick", "disabled", "size", "rounded", "dataTest"]); | ||
@@ -229,6 +229,6 @@ const classes = cx$1('ids-icon-btn', `ids-icon-btn--${size}`, className, { | ||
}); | ||
return (React.createElement(Button, Object.assign({ className: classes, onClick: onClick, disabled: disabled }, rest), icon)); | ||
}; | ||
return (React.createElement(Button, Object.assign({ ref: ref, className: classes, onClick: onClick, disabled: disabled }, rest), icon)); | ||
}); | ||
export { IconButton as default }; | ||
//# sourceMappingURL=IconButton.js.map |
{ | ||
"name": "@igloo-ui/icon-button", | ||
"version": "0.2.9", | ||
"version": "0.2.10", | ||
"main": "dist/IconButton.js", | ||
@@ -23,9 +23,12 @@ "module": "dist/IconButton.js", | ||
], | ||
"scripts": { | ||
"build": "rollup -c rollup.config.js" | ||
}, | ||
"dependencies": { | ||
"@igloo-ui/button": "^0.3.0", | ||
"@igloo-ui/tokens": "^1.1.1", | ||
"@igloo-ui/tokens": "^2.0.0", | ||
"classnames": "^2.3.1" | ||
}, | ||
"devDependencies": { | ||
"@igloo-ui/icons": "^1.0.0" | ||
"@igloo-ui/icons": "^1.3.0" | ||
}, | ||
@@ -37,3 +40,3 @@ "browserslist": [ | ||
], | ||
"gitHead": "77bf6715869bf65e9109a007a43cf5a2590641b5" | ||
"gitHead": "e22f4c8e0938fb8edd2f7948fc4aa2d9943f6dfd" | ||
} |
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
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
37902
223
- Removed@igloo-ui/tokens@1.3.0(transitive)
Updated@igloo-ui/tokens@^2.0.0