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

Fixed centering of EmptyStateEditor #540

Merged
merged 2 commits into from
Dec 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
7 changes: 7 additions & 0 deletions .changeset/funny-bulldogs-retire.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"@tokens-studio/graph-engine-nodes-design-tokens": patch
"@tokens-studio/graph-editor": patch
"@tokens-studio/graph-engine-ui": patch
---

Fixed centering of EmptyStateEditor
5 changes: 2 additions & 3 deletions packages/ui/src/components/EmptyStateEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@
);
}

function EmptyStateInner({ onLoadExamples, showNodesPanel }: IEmptyStateProps) {
function EmptyStateInner({ onLoadExamples }: IEmptyStateProps) {
const dispatch = useDispatch();

const handleTriggerAddNode = useCallback(() => {
dispatch.ui.setShowNodesCmdPalette(true);
}, []);

Check warning on line 29 in packages/ui/src/components/EmptyStateEditor.tsx

View workflow job for this annotation

GitHub Actions / Verify changes

React Hook useCallback has a missing dependency: 'dispatch.ui'. Either include it or remove the dependency array

return (
<div
Expand All @@ -38,8 +38,7 @@
width: '100%',
height: '100%',
position: 'relative',
zIndex: 100,
paddingLeft: showNodesPanel ? 'var(--globals-drop-panel-width)' : '0'
zIndex: 100
}}
>
<EmptyState
Expand Down
Loading