From 49709dc48372ddf53e0c580ec7e76ad6e6de6c34 Mon Sep 17 00:00:00 2001 From: Sanjiv Das Date: Mon, 4 Nov 2024 09:19:15 -0800 Subject: [PATCH] Reduced padding in cell around code icons in code toolbar (#1072) * Reduced padding in cell around code icons in code toolbar * Update code-toolbar.tsx * Implemented icon separattion using sx prop * Update tooltipped-icon-button.tsx --- packages/jupyter-ai/src/components/code-blocks/code-toolbar.tsx | 2 +- .../src/components/mui-extras/tooltipped-icon-button.tsx | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/jupyter-ai/src/components/code-blocks/code-toolbar.tsx b/packages/jupyter-ai/src/components/code-blocks/code-toolbar.tsx index ccb46eb40..315e5d4d6 100644 --- a/packages/jupyter-ai/src/components/code-blocks/code-toolbar.tsx +++ b/packages/jupyter-ai/src/components/code-blocks/code-toolbar.tsx @@ -44,7 +44,7 @@ export function CodeToolbar(props: CodeToolbarProps): JSX.Element { display: 'flex', justifyContent: 'flex-end', alignItems: 'center', - padding: '6px 2px', + padding: '2px 2px', marginBottom: '1em', border: '1px solid var(--jp-cell-editor-border-color)', borderTop: 'none' diff --git a/packages/jupyter-ai/src/components/mui-extras/tooltipped-icon-button.tsx b/packages/jupyter-ai/src/components/mui-extras/tooltipped-icon-button.tsx index 31279b4d9..e379ab39e 100644 --- a/packages/jupyter-ai/src/components/mui-extras/tooltipped-icon-button.tsx +++ b/packages/jupyter-ai/src/components/mui-extras/tooltipped-icon-button.tsx @@ -80,6 +80,7 @@ export function TooltippedIconButton( onClick={props.onClick} disabled={props.disabled} sx={{ + ml: '8px', lineHeight: 0, ...(props.disabled && { opacity: 0.5 }), ...props.sx