Commit d57a835d authored by tom's avatar tom

new color for copy to clipboard icon

parent 9e92c0da
import { IconButton, Tooltip, useClipboard, chakra, useDisclosure, Skeleton } from '@chakra-ui/react'; import { IconButton, Tooltip, useClipboard, chakra, useDisclosure, Skeleton, useColorModeValue } from '@chakra-ui/react';
import React, { useEffect, useState } from 'react'; import React, { useEffect, useState } from 'react';
import IconSvg from 'ui/shared/IconSvg'; import IconSvg from 'ui/shared/IconSvg';
...@@ -14,6 +14,7 @@ const CopyToClipboard = ({ text, className, isLoading }: Props) => { ...@@ -14,6 +14,7 @@ const CopyToClipboard = ({ text, className, isLoading }: Props) => {
const [ copied, setCopied ] = useState(false); const [ copied, setCopied ] = useState(false);
// have to implement controlled tooltip because of the issue - https://github.com/chakra-ui/chakra-ui/issues/7107 // have to implement controlled tooltip because of the issue - https://github.com/chakra-ui/chakra-ui/issues/7107
const { isOpen, onOpen, onClose } = useDisclosure(); const { isOpen, onOpen, onClose } = useDisclosure();
const iconColor = useColorModeValue('gray.400', 'gray.500');
useEffect(() => { useEffect(() => {
if (hasCopied) { if (hasCopied) {
...@@ -34,7 +35,7 @@ const CopyToClipboard = ({ text, className, isLoading }: Props) => { ...@@ -34,7 +35,7 @@ const CopyToClipboard = ({ text, className, isLoading }: Props) => {
icon={ <IconSvg name="copy" boxSize={ 5 }/> } icon={ <IconSvg name="copy" boxSize={ 5 }/> }
w="20px" w="20px"
h="20px" h="20px"
color="gray.400" color={ iconColor }
variant="simple" variant="simple"
display="inline-block" display="inline-block"
flexShrink={ 0 } flexShrink={ 0 }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment