Add isImage prop in RawIcon

Signed-off-by: Ajay Bura <ajbura@gmail.com>
This commit is contained in:
Ajay Bura
2021-12-30 12:44:14 +05:30
parent d3dcb320f4
commit c2402ddb72
3 changed files with 21 additions and 7 deletions

View File

@@ -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;