Skip to content

Commit

Permalink
Fix ClickToCopyText to display correct color
Browse files Browse the repository at this point in the history
  • Loading branch information
Jaewoook committed Aug 10, 2022
1 parent 64fb2b7 commit babcf8f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
3 changes: 0 additions & 3 deletions src/components/ClickToCopyText/ClickToCopyText.css

This file was deleted.

10 changes: 5 additions & 5 deletions src/components/ClickToCopyText/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@
* External modules
*/
import React, { useCallback, useState } from "react";
import styled from "styled-components";
import {
Button,
Tooltip,
} from "antd";
import copy from "copy-to-clipboard";

/**
* Internal modules
*/
import "./ClickToCopyText.css";
const Text = styled(Button)`
color: rgba(0, 0, 0, 0.65);
`;

interface ClickToCopyTextProps {
children: string;
Expand All @@ -33,7 +33,7 @@ export const ClickToCopyText = (props: ClickToCopyTextProps) => {
}, []);
return (
<Tooltip title={!copied ? "클릭해서 복사하기" : "복사완료!"} onVisibleChange={handleVisibleChange}>
<Button className="text-click-to-copy" type="link" onClick={handleCopyClick}>{children}</Button>
<Text type="link" onClick={handleCopyClick}>{children}</Text>
</Tooltip>
);
};

0 comments on commit babcf8f

Please sign in to comment.