Skip to content

Commit 7fa2061

Browse files
committed
Fix: コピーにツールチップ追加
1 parent 27dea2e commit 7fa2061

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

src/components/common/Form/CopyButton.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { CopyOutlined } from '@ant-design/icons';
2-
import { Button } from 'antd';
2+
import { Button, Tooltip } from 'antd';
33
import type { ButtonProps } from 'antd/es/button/button';
44
import React, { FC } from 'react';
55
import { useCopy } from '@/hooks/useCopy';
@@ -12,5 +12,9 @@ type Props = {
1212
export const CopyButton: FC<Props> = ({ copyText, size }) => {
1313
const { copy } = useCopy();
1414

15-
return <Button icon={<CopyOutlined />} size={size} onClick={copy(copyText)} />;
15+
return (
16+
<Tooltip title="コピー">
17+
<Button icon={<CopyOutlined />} size={size} onClick={copy(copyText)} />
18+
</Tooltip>
19+
);
1620
};

0 commit comments

Comments
 (0)