mirror of
https://github.com/DefectingCat/DefectingCat.github.io
synced 2025-07-15 16:51:37 +00:00
Add copy hooks
Add copy button on post
This commit is contained in:
@ -3,10 +3,10 @@ import { useState } from 'react';
|
||||
import styles from './CopytButton.module.css';
|
||||
|
||||
export type CopyButtonProps = {
|
||||
onClick?: () => void;
|
||||
onCopy?: () => void;
|
||||
};
|
||||
|
||||
const CopyButton = ({ onClick }: CopyButtonProps) => {
|
||||
const CopyButton = ({ onCopy: onClick }: CopyButtonProps) => {
|
||||
const [copied, setCopied] = useState(false);
|
||||
const handleClick = () => {
|
||||
onClick?.();
|
||||
|
Reference in New Issue
Block a user