fixes cursor default to pointer (#5696)

* fixes cursor default to pointer

* Added cursor to icon widget

---------

Co-authored-by: Kavin Venkatachalam <kavin.saratha@gmail.com>
This commit is contained in:
Shaurya Gupta 2023-04-29 20:08:36 +05:30 committed by GitHub
parent 2638b0285a
commit 5d670417e2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 3 deletions

View file

@ -3,11 +3,13 @@ import React, { useState, useEffect } from 'react';
import * as Icons from '@tabler/icons-react';
import cx from 'classnames';
export const Icon = ({ properties, styles, fireEvent, width, height, registerAction, darkMode, dataCy }) => {
export const Icon = ({ properties, styles, fireEvent, width, height, registerAction, darkMode, dataCy, component }) => {
const { icon } = properties;
const { iconColor, visibility } = styles;
// eslint-disable-next-line import/namespace
const IconElement = Icons[icon];
const { definition } = component;
const { events = [] } = definition;
const color = iconColor === '#000' ? (darkMode ? '#fff' : '#000') : iconColor;
@ -31,7 +33,10 @@ export const Icon = ({ properties, styles, fireEvent, width, height, registerAct
});
return (
<div className={cx('icon-widget', { 'd-none': !showIcon })} data-cy={dataCy}>
<div
className={cx('icon-widget', { 'd-none': !showIcon }, { 'cursor-pointer': events.length > 0 })}
data-cy={dataCy}
>
<IconElement
color={color}
style={{ width, height }}

View file

@ -6120,7 +6120,6 @@ input.hide-input-arrows {
.popover-header {
background-color: #232e3c;
border-bottom: 1px solid #324156;
;
}
}