mirror of
https://github.com/ToolJet/ToolJet
synced 2026-05-05 22:38:48 +00:00
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:
parent
2638b0285a
commit
5d670417e2
2 changed files with 7 additions and 3 deletions
|
|
@ -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 }}
|
||||
|
|
|
|||
|
|
@ -6120,7 +6120,6 @@ input.hide-input-arrows {
|
|||
.popover-header {
|
||||
background-color: #232e3c;
|
||||
border-bottom: 1px solid #324156;
|
||||
;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue