Add isImage prop in RawIcon
Signed-off-by: Ajay Bura <ajbura@gmail.com>
This commit is contained in:
@@ -10,7 +10,7 @@ import Text from '../text/Text';
|
||||
const IconButton = React.forwardRef(({
|
||||
variant, size, type,
|
||||
tooltip, tooltipPlacement, src,
|
||||
onClick, tabIndex, disabled,
|
||||
onClick, tabIndex, disabled, isImage,
|
||||
}, ref) => {
|
||||
const btn = (
|
||||
<button
|
||||
@@ -23,7 +23,7 @@ const IconButton = React.forwardRef(({
|
||||
tabIndex={tabIndex}
|
||||
disabled={disabled}
|
||||
>
|
||||
<RawIcon size={size} src={src} />
|
||||
<RawIcon size={size} src={src} isImage={isImage} />
|
||||
</button>
|
||||
);
|
||||
if (tooltip === null) return btn;
|
||||
@@ -46,6 +46,7 @@ IconButton.defaultProps = {
|
||||
onClick: null,
|
||||
tabIndex: 0,
|
||||
disabled: false,
|
||||
isImage: false,
|
||||
};
|
||||
|
||||
IconButton.propTypes = {
|
||||
@@ -58,6 +59,7 @@ IconButton.propTypes = {
|
||||
onClick: PropTypes.func,
|
||||
tabIndex: PropTypes.number,
|
||||
disabled: PropTypes.bool,
|
||||
isImage: PropTypes.bool,
|
||||
};
|
||||
|
||||
export default IconButton;
|
||||
|
||||
Reference in New Issue
Block a user