Merge pull request #10934 from Rohan-3337/fix/inspector-tooltip-popups

Fix: Updated tooltips and pop-ups for copy path and copy value actions
This commit is contained in:
Johnson Cherian 2024-10-25 13:36:16 +05:30 committed by GitHub
commit 95863de572
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 7 additions and 7 deletions

View file

@ -88,6 +88,7 @@ export const Inspector = ({
layouts: allComponents[selectedComponentId].layouts,
parent: allComponents[selectedComponentId].parent,
};
const [showWidgetDeleteConfirmation, setWidgetDeleteConfirmation] = useState(false);
// eslint-disable-next-line no-unused-vars
const [newComponentName, setNewComponentName] = useState('');
@ -461,8 +462,8 @@ export const Inspector = ({
componentMeta.displayName === 'Toggle Switch (Legacy)'
? 'Toggle (Legacy)'
: componentMeta.displayName === 'Toggle Switch'
? 'Toggle Switch'
: componentMeta.component,
? 'Toggle Switch'
: componentMeta.component,
})}
</small>
</span>

View file

@ -110,9 +110,8 @@ export const LeftSidebarInspector = ({
if (!_.isEmpty(component) && component.name === key) {
return {
iconName: key,
iconPath: `assets/images/icons/widgets/${
component.component.toLowerCase() === 'radiobutton' ? 'radio-button' : component.component.toLowerCase()
}.svg`,
iconPath: `assets/images/icons/widgets/${component.component.toLowerCase() === 'radiobutton' ? 'radio-button' : component.component.toLowerCase()
}.svg`,
className: 'component-icon',
};
}
@ -235,7 +234,7 @@ export const LeftSidebarInspector = ({
const copyToClipboard = (data) => {
const stringified = JSON.stringify(data, null, 2).replace(/\\/g, '');
navigator.clipboard.writeText(stringified);
return toast.success('Copied to the clipboard', { position: 'top-center' });
return toast.success('Value copied to clipboard', { position: 'top-center' });
};
const callbackActions = [

View file

@ -53,4 +53,4 @@
"prepare": "husky install",
"update-version": "node update-version.js"
}
}
}