mirror of
https://github.com/arc53/DocsGPT.git
synced 2025-11-29 08:33:20 +00:00
fix: use hexcode for purple taupe and rm extra props
This commit is contained in:
@@ -8,10 +8,6 @@ import CopyIcon from '../assets/copy.svg?react';
|
|||||||
|
|
||||||
type CopyButtonProps = {
|
type CopyButtonProps = {
|
||||||
textToCopy: string;
|
textToCopy: string;
|
||||||
bgColorLight?: string;
|
|
||||||
bgColorDark?: string;
|
|
||||||
hoverBgColorLight?: string;
|
|
||||||
hoverBgColorDark?: string;
|
|
||||||
iconSize?: string;
|
iconSize?: string;
|
||||||
padding?: string;
|
padding?: string;
|
||||||
showText?: boolean;
|
showText?: boolean;
|
||||||
@@ -27,14 +23,11 @@ const DEFAULT_COPIED_DURATION = 2000;
|
|||||||
const DEFAULT_BG_LIGHT = '#FFFFFF';
|
const DEFAULT_BG_LIGHT = '#FFFFFF';
|
||||||
const DEFAULT_BG_DARK = 'transparent';
|
const DEFAULT_BG_DARK = 'transparent';
|
||||||
const DEFAULT_HOVER_BG_LIGHT = '#EEEEEE';
|
const DEFAULT_HOVER_BG_LIGHT = '#EEEEEE';
|
||||||
const DEFAULT_HOVER_BG_DARK = 'purple-taupe';
|
const DEFAULT_HOVER_BG_DARK = '#464152';
|
||||||
|
|
||||||
export default function CopyButton({
|
export default function CopyButton({
|
||||||
textToCopy,
|
textToCopy,
|
||||||
bgColorLight = DEFAULT_BG_LIGHT,
|
|
||||||
bgColorDark = DEFAULT_BG_DARK,
|
|
||||||
hoverBgColorLight = DEFAULT_HOVER_BG_LIGHT,
|
|
||||||
hoverBgColorDark = DEFAULT_HOVER_BG_DARK,
|
|
||||||
iconSize = DEFAULT_ICON_SIZE,
|
iconSize = DEFAULT_ICON_SIZE,
|
||||||
padding = DEFAULT_PADDING,
|
padding = DEFAULT_PADDING,
|
||||||
showText = false,
|
showText = false,
|
||||||
@@ -50,9 +43,9 @@ export default function CopyButton({
|
|||||||
const iconWrapperClasses = clsx(
|
const iconWrapperClasses = clsx(
|
||||||
'flex items-center justify-center rounded-full transition-colors duration-150 ease-in-out',
|
'flex items-center justify-center rounded-full transition-colors duration-150 ease-in-out',
|
||||||
padding,
|
padding,
|
||||||
`bg-[${bgColorLight}] dark:bg-[${bgColorDark}]`,
|
`bg-[${DEFAULT_BG_LIGHT}] dark:bg-[${DEFAULT_BG_DARK}]`,
|
||||||
{
|
{
|
||||||
[`hover:bg-[${hoverBgColorLight}] dark:hover:bg-${hoverBgColorDark}`]:
|
[`hover:bg-[${DEFAULT_HOVER_BG_LIGHT}] dark:hover:bg-[${DEFAULT_HOVER_BG_DARK}]`]:
|
||||||
!isCopied,
|
!isCopied,
|
||||||
'bg-green-100 dark:bg-green-900 hover:bg-green-100 dark:hover:bg-green-900':
|
'bg-green-100 dark:bg-green-900 hover:bg-green-100 dark:hover:bg-green-900':
|
||||||
isCopied,
|
isCopied,
|
||||||
|
|||||||
Reference in New Issue
Block a user