From 745a6cd1b5b7ccbcbea3f49ee2617e72be906adb Mon Sep 17 00:00:00 2001 From: Andrii Ieroshenko Date: Wed, 10 Jan 2024 12:43:34 -0800 Subject: [PATCH] revert CopyButton styling --- .../jupyter-ai/src/components/copy-button.tsx | 22 ++++++++++--------- packages/jupyter-ai/style/base.css | 1 - packages/jupyter-ai/style/copy-button.css | 11 ---------- 3 files changed, 12 insertions(+), 22 deletions(-) delete mode 100644 packages/jupyter-ai/style/copy-button.css diff --git a/packages/jupyter-ai/src/components/copy-button.tsx b/packages/jupyter-ai/src/components/copy-button.tsx index f3c537eef..a159e7045 100644 --- a/packages/jupyter-ai/src/components/copy-button.tsx +++ b/packages/jupyter-ai/src/components/copy-button.tsx @@ -1,9 +1,9 @@ import React, { useState, useCallback } from 'react'; -import Button from '@mui/material/Button'; +import { Box, Button } from '@mui/material'; -const CC_BTN_CLASS = 'jp-ai-copy-button'; -const CC_BTN_CONTAINER_CLASS = 'jp-ai-copy-button-container'; +// const CC_BTN_CLASS = 'jp-ai-copy-button'; +// const CC_BTN_CONTAINER_CLASS = 'jp-ai-copy-button-container'; enum CopyStatus { None, @@ -12,7 +12,7 @@ enum CopyStatus { } const COPYBTN_TEXT_BY_STATUS: Record = { - [CopyStatus.None]: 'Copy to clipboard', + [CopyStatus.None]: 'Copy To Clipboard', [CopyStatus.Copying]: 'Copying...', [CopyStatus.Copied]: 'Copied!' }; @@ -39,16 +39,18 @@ export function CopyButton(props: CopyButtonProps): JSX.Element { }, [props.value]); return ( -
+ -
+ ); } diff --git a/packages/jupyter-ai/style/base.css b/packages/jupyter-ai/style/base.css index 7ce0e5434..cf5960336 100644 --- a/packages/jupyter-ai/style/base.css +++ b/packages/jupyter-ai/style/base.css @@ -7,4 +7,3 @@ @import './expandable-text-field.css'; @import './chat-settings.css'; @import './rendermime-markdown.css'; -@import './copy-button.css'; diff --git a/packages/jupyter-ai/style/copy-button.css b/packages/jupyter-ai/style/copy-button.css deleted file mode 100644 index e5d520518..000000000 --- a/packages/jupyter-ai/style/copy-button.css +++ /dev/null @@ -1,11 +0,0 @@ -.jp-ai-copy-button-container { - display: flex; - justify-content: flex-end; - margin-block-start: 4px; -} - -.jp-ai-copy-button.MuiButton-root { - font-size: var(--jp-content-font-size0); - min-width: 11.1em; - text-transform: none; -}