Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Button component revamp #8361

Merged
merged 144 commits into from
May 24, 2024
Merged
Show file tree
Hide file tree
Changes from 138 commits
Commits
Show all changes
144 commits
Select commit Hold shift + click to select a range
1d70fba
init textinput revamp
stepinfwd Oct 25, 2023
7c868c1
updated styles panel
stepinfwd Oct 27, 2023
20cd024
bugfix
stepinfwd Oct 27, 2023
9d201c8
updates
stepinfwd Oct 29, 2023
ce1678f
fix :: accordion
stepinfwd Oct 29, 2023
91d404c
fix :: styling
stepinfwd Oct 29, 2023
9b84a40
add box shadow , additional property,tooltip
stepinfwd Oct 30, 2023
caa6118
fix conditional render for styles
stepinfwd Oct 30, 2023
bca15b1
Merge branch 'feature/text-input' of https://github.com/ToolJet/ToolJ…
stepinfwd Oct 31, 2023
b244413
feat :: fixed order of each property and styles
stepinfwd Oct 31, 2023
7f7aa1c
feat :: styling input
stepinfwd Oct 31, 2023
25f6639
bugfix
stepinfwd Oct 31, 2023
2bd51a5
feat :: add option to add icon
stepinfwd Nov 3, 2023
d23fcc0
add option to add icon
stepinfwd Nov 3, 2023
71c4c97
adding option to toggle visibility
stepinfwd Nov 7, 2023
395b852
updated password input with new design
stepinfwd Nov 8, 2023
c9ae42c
chnaging component location
stepinfwd Nov 8, 2023
2ff0e69
Merge branch 'appbuilder-1.4' into feature/text-input
stepinfwd Nov 8, 2023
419825c
Merge branch 'feature/text-input' into feature/password-input-updated
stepinfwd Nov 8, 2023
a98262a
bugfix
stepinfwd Nov 9, 2023
1a0c0a1
style fixes
stepinfwd Nov 9, 2023
6d1fc58
Merge branch 'feature/text-input' into feature/password-input-updated
stepinfwd Nov 9, 2023
40b0fa6
fix :: added loader
stepinfwd Nov 9, 2023
0602fe1
updated :: few detailing
stepinfwd Nov 15, 2023
9768957
few bugfixes
stepinfwd Nov 15, 2023
9109d5a
fix :: for form widget label
stepinfwd Nov 15, 2023
6857d1b
fixes
stepinfwd Nov 26, 2023
d6e0f29
added option to add icon color
stepinfwd Nov 27, 2023
3c50909
including label field for password input
stepinfwd Nov 28, 2023
c0eac10
Merge branch 'feature/text-input' into feature/password-input-updated
stepinfwd Nov 28, 2023
017540e
fix for label
stepinfwd Nov 28, 2023
2cdb359
fix
stepinfwd Nov 28, 2023
78ec9b3
test fix backward compatibility for height
stepinfwd Nov 28, 2023
0c1ed22
updates
stepinfwd Nov 29, 2023
e0c2b9c
revert
stepinfwd Nov 29, 2023
79482c3
adding key for distinguishing older and newer widgets
stepinfwd Nov 29, 2023
cc19d89
testing
stepinfwd Nov 29, 2023
4f3e47d
test
stepinfwd Nov 29, 2023
3611e30
test
stepinfwd Nov 29, 2023
202068a
Merge branch 'appbuilder-1.4' into feature/text-input
stepinfwd Nov 30, 2023
0a338e8
update
stepinfwd Nov 30, 2023
84d59b5
update
stepinfwd Nov 30, 2023
d0626ab
migration testing
stepinfwd Nov 30, 2023
a956910
limit vertical resizing in textinput
stepinfwd Nov 30, 2023
efb629f
testing
stepinfwd Nov 30, 2023
a4fe256
throw test
stepinfwd Nov 30, 2023
ee17bcf
test
stepinfwd Nov 30, 2023
cbd4156
adding check for label length
stepinfwd Nov 30, 2023
a95083c
fixing edge cases
stepinfwd Dec 3, 2023
955c21c
Merge branch 'feature/text-input' into feature/password-input-updated
stepinfwd Dec 3, 2023
4efab1b
removing resize
stepinfwd Dec 3, 2023
1b0b49e
backward compatibility height
stepinfwd Dec 4, 2023
44c4155
backward compatibility
stepinfwd Dec 4, 2023
98d2350
number input review fixes
stepinfwd Dec 8, 2023
245f1f1
added exposed items
stepinfwd Dec 8, 2023
b59eea3
fixing csa
stepinfwd Dec 10, 2023
5b3b553
ui fixes
stepinfwd Dec 12, 2023
1c85650
Merge branch 'feature/number-input-1.4' into feature/text-input
stepinfwd Dec 12, 2023
2527b80
fix height compatibility
stepinfwd Dec 12, 2023
e3f28ce
Merge branch 'feature/password-input-updated' into feature/text-input
stepinfwd Dec 12, 2023
00e43a7
feat :: csa for all inputs and exposed variables
stepinfwd Dec 12, 2023
b86b964
backward compatibility fixes and validation fixes
stepinfwd Dec 13, 2023
de7f6f3
fixes :: textinput positioning of loader and icon
stepinfwd Dec 13, 2023
bf1fb33
fix :: password input
stepinfwd Dec 14, 2023
a4fe031
cleanup and fixes
stepinfwd Dec 16, 2023
ab7b836
fixes
stepinfwd Dec 17, 2023
df55036
cleanup
stepinfwd Dec 17, 2023
4e5a39d
Merge branch 'appbuilder-1.5' into feature/text-input
stepinfwd Dec 17, 2023
a7bf7cf
fixes
stepinfwd Dec 18, 2023
2fd85f7
review fixes
stepinfwd Dec 20, 2023
1349592
review fixes
stepinfwd Dec 20, 2023
41c6d18
button component revamped
stepinfwd Dec 20, 2023
a8ede5b
fix :: csa
stepinfwd Dec 20, 2023
d99c714
typo fix
stepinfwd Dec 20, 2023
16a3cc9
Merge branch 'feature/text-input' into feature/button-revamp
stepinfwd Dec 20, 2023
10b132f
typo
stepinfwd Dec 20, 2023
4d59ee6
fix :: styling
stepinfwd Dec 21, 2023
d8584b4
exposed variables
stepinfwd Dec 21, 2023
28437b1
fix padding
stepinfwd Dec 21, 2023
f93bf36
review fixes styles component panel
stepinfwd Dec 22, 2023
fb75750
fix naming
stepinfwd Dec 22, 2023
8caba8f
fix padding
stepinfwd Dec 22, 2023
f1a7752
Merge branch 'appbuilder-1.5' into feature/text-input
stepinfwd Jan 8, 2024
02c5509
Merge branch 'feature/text-input' into feature/button-revamp
stepinfwd Jan 8, 2024
fd203b1
default size
stepinfwd Jan 10, 2024
f56cd94
fix :: icons position
stepinfwd Jan 10, 2024
1d37279
updates
stepinfwd Jan 10, 2024
68be3e9
cleanup
stepinfwd Jan 11, 2024
bb97751
updates events , csa
stepinfwd Jan 11, 2024
c1e7ee3
cleanup
stepinfwd Jan 12, 2024
a0232e8
remove border
stepinfwd Jan 12, 2024
0ee164e
backward compatibility
stepinfwd Jan 12, 2024
90a6a09
clean
stepinfwd Jan 12, 2024
5dd19c0
Merge branch 'feature/text-input' into feature/button-revamp
stepinfwd Jan 12, 2024
f1879f1
Merge branch 'appbuilder-1.5' into feature/text-input
stepinfwd Jan 13, 2024
9131731
feat :: change validation from properties
stepinfwd Jan 13, 2024
e989ef0
ui fixes
stepinfwd Jan 14, 2024
df167c0
icon name
stepinfwd Jan 14, 2024
a052dbe
disabled state
stepinfwd Jan 14, 2024
ee0dbfa
removed 'px' text from tooltip
stepinfwd Jan 18, 2024
246196c
fixes placeholder
stepinfwd Jan 18, 2024
f2d60f3
few updates :: removing label in form
stepinfwd Jan 18, 2024
3b389e9
ui in form
stepinfwd Jan 19, 2024
ca4163d
update :: number input validation behaviour
stepinfwd Jan 19, 2024
7c0fe6b
Merge branch 'appbuilder-1.5' into feature/text-input
stepinfwd Jan 19, 2024
3f76e43
testing fixes
stepinfwd Jan 21, 2024
9a4366a
added side handlers
stepinfwd Jan 21, 2024
312e0d6
removing unwanted fx
stepinfwd Jan 21, 2024
a16dfe6
disabling fx for padding field
stepinfwd Jan 21, 2024
5ef13be
ordering change
stepinfwd Jan 22, 2024
f187314
fix
stepinfwd Jan 22, 2024
96f8dfc
label issue + restricted side handler
stepinfwd Jan 22, 2024
0c23931
fix :: box shadow bug
stepinfwd Jan 22, 2024
acb3aaf
on change event doesnt propagate exposed vars correctly
stepinfwd Jan 24, 2024
a580957
adding debounce for slider value change
stepinfwd Jan 25, 2024
01a3283
fix :: for modal ooen bug during onfocus event
stepinfwd Jan 25, 2024
a9a329f
test slider
stepinfwd Jan 25, 2024
7e618ca
fix :: bugs regarding state update in checbox , slider , slider bug
stepinfwd Jan 29, 2024
7153b14
update slider with radix slider
stepinfwd Jan 29, 2024
f040e80
bugfix
stepinfwd Jan 29, 2024
c316cd9
Merge branch 'feature/text-input' into feature/button-revamp
stepinfwd Jan 30, 2024
b2cc1a3
Merge branch 'appbuilder-1.6' into feature/button-revamp
stepinfwd Mar 11, 2024
99bcce0
merge fixes
stepinfwd Mar 11, 2024
3e31b53
Merge branch 'appbuilder-1.6' into feature/button-revamp
stepinfwd Mar 11, 2024
016de6a
fix
stepinfwd Mar 11, 2024
cc5dd74
updates
stepinfwd Mar 11, 2024
94a0247
removing unwanted migrations
stepinfwd Mar 12, 2024
98524ad
fix: box shadow
stepinfwd Mar 12, 2024
4bfbabf
fix : import export issues
stepinfwd Mar 13, 2024
f288862
fix : colouring
stepinfwd Mar 15, 2024
cb1cfda
cleanup
stepinfwd Mar 15, 2024
6e0a4f5
Merge remote-tracking branch 'origin/appbuilder-1.7' into feature/but…
stepinfwd May 1, 2024
c69026e
fixes
stepinfwd May 1, 2024
6ba2666
fix : design review comments
stepinfwd May 8, 2024
6ee5b82
add border color
stepinfwd May 8, 2024
f48b964
fix : review changes
stepinfwd May 9, 2024
8165649
fix
stepinfwd May 9, 2024
10cacfc
change display name to solid
stepinfwd May 9, 2024
e1dd91d
fix label
stepinfwd May 15, 2024
c631561
Merge branch 'appbuilder-1.7' into feature/button-revamp
stepinfwd May 15, 2024
63779a3
fix : loader issue
stepinfwd May 15, 2024
cd10eca
fix : button icon position
stepinfwd May 15, 2024
d35afc5
fix : qa bugs
stepinfwd May 16, 2024
ad3dbe1
Merge branch 'appbuilder-1.7' into feature/button-revamp
stepinfwd May 24, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion frontend/src/Editor/Box.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ export const Box = memo(
const backgroundColor = yellow ? 'yellow' : '';
const currentState = useCurrentState();
const { events } = useAppInfo();
const shouldAddBoxShadowAndVisibility = ['TextInput', 'PasswordInput', 'NumberInput', 'Text'];
const shouldAddBoxShadowAndVisibility = ['TextInput', 'PasswordInput', 'NumberInput', 'Text', 'Button'];

const componentMeta = useMemo(() => {
return componentTypes.find((comp) => component.component === comp.component);
Expand Down
30 changes: 28 additions & 2 deletions frontend/src/Editor/CodeBuilder/Elements/Color.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,34 @@ import OverlayTrigger from 'react-bootstrap/OverlayTrigger';
import Popover from 'react-bootstrap/Popover';
import classNames from 'classnames';

export const Color = ({ value, onChange, pickerStyle = {}, cyLabel, asBoxShadowPopover = true, meta }) => {
export const Color = ({ value, onChange, pickerStyle = {}, cyLabel, asBoxShadowPopover = true, meta, component }) => {
// This function is written only to handle diff colors W.R.T button types
const computeColor = () => {
if (component?.component?.definition?.styles?.type?.value == 'primary') return value;
else {
if (meta?.displayName == 'Background') {
value = value == '#4368E3' ? '#FFFFFF' : value;
return value;
}
if (meta?.displayName == 'Text color') {
value = value == '#FFFFFF' ? '#1B1F24' : value;
return value;
}
if (meta?.displayName == 'Icon color') {
value = value == '#FFFFFF' ? '#CCD1D5' : value;
return value;
}
if (meta?.displayName == 'Border color') {
value = value == '#4368E3' ? '#CCD1D5' : value;
return value;
}
if (meta?.displayName == 'Loader color') {
return value;
}
}
};
value = component.component.component == 'Button' ? computeColor() : value;

const [showPicker, setShowPicker] = useState(false);
const darkMode = localStorage.getItem('darkMode') === 'true';
const colorPickerPosition = meta?.colorPickerPosition ?? '';
Expand All @@ -15,7 +42,6 @@ export const Color = ({ value, onChange, pickerStyle = {}, cyLabel, asBoxShadowP
bottom: '0px',
left: '0px',
};

const outerStyles = {
width: '142px',
height: '32px',
Expand Down
169 changes: 147 additions & 22 deletions frontend/src/Editor/Components/Button.jsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,31 @@
import React, { useEffect, useState } from 'react';
import cx from 'classnames';
const tinycolor = require('tinycolor2');
import * as Icons from '@tabler/icons-react';

export const Button = function Button(props) {
const { height, properties, styles, fireEvent, id, dataCy, setExposedVariable, setExposedVariables } = props;
const { backgroundColor, textColor, borderRadius, loaderColor, disabledState, borderColor, boxShadow } = styles;
const {
backgroundColor,
textColor,
borderRadius,
loaderColor,
borderColor,
boxShadow,
iconColor,
direction,
type,
iconVisibility,
} = styles;

const { loadingState, disabledState } = properties;
const [label, setLabel] = useState(properties.text);
const [disable, setDisable] = useState(disabledState);
const [visibility, setVisibility] = useState(styles.visibility);
const [loading, setLoading] = useState(properties.loadingState);
const [disable, setDisable] = useState(disabledState || loadingState);
const [visibility, setVisibility] = useState(properties.visibility);
const [loading, setLoading] = useState(loadingState);
const iconName = styles.icon; // Replace with the name of the icon you want
// eslint-disable-next-line import/namespace
const IconElement = Icons[iconName] == undefined ? Icons['IconHome2'] : Icons[iconName];

useEffect(() => {
setLabel(properties.text);
Expand All @@ -23,26 +39,48 @@ export const Button = function Button(props) {
}, [disabledState]);

useEffect(() => {
visibility !== styles.visibility && setVisibility(styles.visibility);
visibility !== properties.visibility && setVisibility(properties.visibility);
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [styles.visibility]);
}, [properties.visibility]);

useEffect(() => {
loading !== properties.loadingState && setLoading(properties.loadingState);
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [properties.loadingState]);

const computedIconColor =
'#FFFFFF' === iconColor ? (type === 'primary' ? iconColor : 'var(--icons-strong)') : iconColor;

const computedBorderColor =
borderColor === '#4368E3' ? (type === 'primary' ? '#4368E3' : 'var(--borders-strong)') : borderColor;

const computedTextColor =
'#FFFFFF' === textColor ? (type === 'primary' ? 'var(--text-on-solid)' : 'var(--text-primary)') : textColor;

const computedBgColor =
'#4368E3' === backgroundColor
? type === 'primary'
? 'var(--primary-brand)'
: 'transparent'
: type === 'primary'
? backgroundColor
: 'transparent';

const computedStyles = {
backgroundColor,
color: textColor,
backgroundColor: computedBgColor,
color: computedTextColor,
width: '100%',
borderRadius: `${borderRadius}px`,
height,
display: visibility ? '' : 'none',
'--tblr-btn-color-darker': tinycolor(backgroundColor).darken(8).toString(),
'--loader-color': tinycolor(loaderColor ?? '#fff').toString(),
borderColor: borderColor,
boxShadow: boxShadow,
'--tblr-btn-color-darker': tinycolor(computedBgColor).darken(8).toString(),
'--tblr-btn-color-clicked': tinycolor(computedBgColor).darken(15).toString(),
'--loader-color': tinycolor(loaderColor ?? 'var(--icons-on-solid)').toString(),
borderColor: computedBorderColor,
boxShadow: type == 'primary' && boxShadow,
padding: '0px 12px',
cursor: 'pointer',
opacity: disable && '50%',
};

useEffect(() => {
Expand Down Expand Up @@ -70,26 +108,72 @@ export const Button = function Button(props) {
setExposedVariables(exposedVariables);

// eslint-disable-next-line react-hooks/exhaustive-deps
}, [disable, setLabel, setDisable, setVisibility, setLoading]);
}, [disable]);

useEffect(() => {
setExposedVariable('setLoading', async function (loading) {
setLoading(loading);
setExposedVariable('isLoading', loading);
});
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [loadingState]);

useEffect(() => {
setExposedVariable('setVisibility', async function (state) {
setVisibility(state);
setExposedVariable('isVisible', state);
});
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [properties.visibility]);

useEffect(() => {
setExposedVariable('setDisable', async function (disable) {
setDisable(disable);
setExposedVariable('isDisabled', disable);
});
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [disabledState]);

useEffect(() => {
setExposedVariable('isLoading', loading);
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [loading]);

useEffect(() => {
setExposedVariable('isVisible', visibility);
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [visibility]);

useEffect(() => {
setExposedVariable('isDisabled', disable);
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [disable]);

const hasCustomBackground = backgroundColor?.charAt() === '#';
const hasCustomBackground = computedBgColor?.charAt() === '#';
if (hasCustomBackground) {
computedStyles['--tblr-btn-color-darker'] = tinycolor(backgroundColor).darken(8).toString();
computedStyles['--tblr-btn-color-darker'] = tinycolor(computedBgColor).darken(8).toString();
computedStyles['--tblr-btn-color-clicked'] = tinycolor(computedBgColor).darken(15).toString();
}

const handleClick = () => {
const event1 = new CustomEvent('submitForm', { detail: { buttonComponentId: id } });
document.dispatchEvent(event1);
fireEvent('onClick');
};

return (
<div className="widget-button">
const renderButton = () => (
<div
className={`widget-button d-flex align-items-center`}
style={{
position: 'relative',
height,
}}
>
<button
disabled={disable}
className={cx('jet-button btn btn-primary p-1 overflow-hidden', {
disabled={disable || loading}
className={cx('overflow-hidden', {
'btn-loading': loading,
'btn-custom': hasCustomBackground,
'jet-button ': type == 'primary',
'jet-outline-button ': type == 'outline',
})}
style={computedStyles}
onClick={handleClick}
Expand All @@ -99,8 +183,49 @@ export const Button = function Button(props) {
data-cy={dataCy}
type="default"
>
{label}
<div
style={{
height: '100%',
width: '100%',
display: 'flex',
alignItems: 'center',
flexDirection: direction == 'right' ? 'row-reverse' : 'row',
justifyContent: 'center',
gap: '6px',
}}
>
<div
style={{
overflow: 'hidden',
}}
>
<span style={{ maxWidth: ' 100%', minWidth: '0' }}>
<p
className="tj-text-sm"
style={{ fontWeight: '500', margin: '0px', padding: '0px', color: computedTextColor }}
>
{label}
</p>
</span>
</div>
{iconVisibility && (
<div className="d-flex">
{!props.isResizing && !loading && (
<IconElement
style={{
width: '16px',
height: '16px',
color: computedIconColor,
}}
stroke={1.5}
/>
)}
</div>
)}
</div>
</button>
</div>
);

return <>{renderButton()}</>;
};
5 changes: 3 additions & 2 deletions frontend/src/Editor/Inspector/Components/DefaultComponent.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,13 @@ import i18next from 'i18next';
import { resolveReferences } from '@/_helpers/utils';
import { AllComponents } from '@/Editor/Box';

const SHOW_ADDITIONAL_ACTIONS = ['Text', 'TextInput', 'NumberInput', 'PasswordInput'];
const SHOW_ADDITIONAL_ACTIONS = ['Text', 'TextInput', 'NumberInput', 'PasswordInput', 'Button'];
const PROPERTIES_VS_ACCORDION_TITLE = {
Text: 'Data',
TextInput: 'Data',
PasswordInput: 'Data',
NumberInput: 'Data',
Button: 'Data',
};

export const DefaultComponent = ({ componentMeta, darkMode, ...restProps }) => {
Expand Down Expand Up @@ -86,7 +87,7 @@ export const baseComponentProperties = (
'Additional Actions': Object.keys(AllComponents).filter(
(component) => !SHOW_ADDITIONAL_ACTIONS.includes(component)
),
General: ['Modal', 'TextInput', 'PasswordInput', 'NumberInput', 'Text', 'Table'],
General: ['Modal', 'TextInput', 'PasswordInput', 'NumberInput', 'Text', 'Table', 'Button'],
Layout: [],
};
if (component.component.component === 'Listview') {
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/Editor/Inspector/Inspector.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ const INSPECTOR_HEADER_OPTIONS = [
},
];

const NEW_REVAMPED_COMPONENTS = ['Text', 'TextInput', 'PasswordInput', 'NumberInput', 'Table'];
const NEW_REVAMPED_COMPONENTS = ['Text', 'TextInput', 'PasswordInput', 'NumberInput', 'Table', 'Button'];

export const Inspector = ({
componentDefinitionChanged,
Expand Down
1 change: 1 addition & 0 deletions frontend/src/Editor/Inspector/Utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ export function renderCustomStyles(
componentConfig.component == 'TextInput' ||
componentConfig.component == 'NumberInput' ||
componentConfig.component == 'PasswordInput' ||
componentConfig.component == 'Button' ||
componentConfig.component == 'Table'
) {
const paramTypeConfig = componentMeta[paramType] || {};
Expand Down
36 changes: 36 additions & 0 deletions frontend/src/Editor/LeftSidebar/SidebarInspector.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -136,11 +136,37 @@ export const LeftSidebarInspector = ({
iconName: 'disable',
jsx: () => <Icon name={'warning'} height={16} width={16} fill="#DB4324" />,
className: 'component-icon',
tooltipMessage: 'This function will be deprecated soon, You can use setDisable as an alternative',
isInfoIcon: true,
});
}

if (componentExposedVariables.visibility) {
icons.push({
iconName: 'visibility',
jsx: () => <Icon name={'warning'} height={16} width={16} fill="#DB4324" />,
className: 'component-icon',
tooltipMessage: 'This function will be deprecated soon, You can use setVisibility as an alternative',
isInfoIcon: true,
});
}

return icons;
}

if (!_.isEmpty(component) && component.component === 'Button') {
const icons = [];

if (componentExposedVariables.disable) {
icons.push({
iconName: 'disable',
jsx: () => <Icon name={'warning'} height={16} width={16} fill="#DB4324" />,
className: 'component-icon',
tooltipMessage: 'This function will be deprecated soon, You can use setDisable as an alternative',
isInfoIcon: true,
});
}

if (componentExposedVariables.visibility) {
icons.push({
iconName: 'visibility',
Expand All @@ -151,6 +177,16 @@ export const LeftSidebarInspector = ({
});
}

if (componentExposedVariables.loading) {
icons.push({
iconName: 'loading',
jsx: () => <Icon name={'warning'} height={16} width={16} fill="#DB4324" />,
className: 'component-icon',
tooltipMessage: 'This function will be deprecated soon, You can use setLoading as an alternative',
isInfoIcon: true,
});
}

return icons;
}

Expand Down
Loading
Loading