Skip to content

Commit

Permalink
add min width to the button
Browse files Browse the repository at this point in the history
  • Loading branch information
andrii-i committed Jan 10, 2024
1 parent 1dcb7de commit 52dcda8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/jupyter-ai/src/components/copy-button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import React, { useState, useCallback } from 'react';

import Button from '@mui/material/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,
Expand All @@ -12,7 +12,7 @@ enum CopyStatus {
}

const COPYBTN_TEXT_BY_STATUS: Record<CopyStatus, string> = {
[CopyStatus.None]: 'Copy',
[CopyStatus.None]: 'Copy to clipboard',
[CopyStatus.Copying]: 'Copying...',
[CopyStatus.Copied]: 'Copied!'
};
Expand Down
2 changes: 2 additions & 0 deletions packages/jupyter-ai/style/copy-button.css
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
.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;
}

0 comments on commit 52dcda8

Please sign in to comment.