mirror of
https://github.com/zoriya/v10.git
synced 2026-08-16 02:45:09 +00:00
chore(ci): eslint + prettier → biome (#325)
This commit is contained in:
@@ -13,14 +13,7 @@ export interface CopyButtonProps {
|
||||
timeout?: number;
|
||||
}
|
||||
|
||||
export default function CopyButton({
|
||||
children,
|
||||
copied,
|
||||
copyFrom,
|
||||
className,
|
||||
style,
|
||||
timeout = 2000,
|
||||
}: CopyButtonProps) {
|
||||
export default function CopyButton({ children, copied, copyFrom, className, style, timeout = 2000 }: CopyButtonProps) {
|
||||
const buttonRef = useRef<HTMLButtonElement>(null);
|
||||
const [isCopied, setIsCopied] = useState(false);
|
||||
const isHydrated = useIsHydrated();
|
||||
@@ -39,7 +32,9 @@ export default function CopyButton({
|
||||
if (target) {
|
||||
text = target?.textContent || '';
|
||||
} else {
|
||||
console.warn(`CopyButton: No target found for selector "${copyFrom.target}" within container "${copyFrom.container}"`);
|
||||
console.warn(
|
||||
`CopyButton: No target found for selector "${copyFrom.target}" within container "${copyFrom.container}"`
|
||||
);
|
||||
}
|
||||
} else {
|
||||
console.warn(`CopyButton: No container found for selector "${copyFrom.container}"`);
|
||||
@@ -69,7 +64,7 @@ export default function CopyButton({
|
||||
style={style}
|
||||
aria-label={isCopied ? 'Copied' : 'Copy to clipboard'}
|
||||
>
|
||||
{isCopied ? (copied || children) : children}
|
||||
{isCopied ? copied || children : children}
|
||||
</button>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user