fix(CopyButton): 修复 review 反馈并补充测试 (#66)

* fix: remove non-functional animation classes from CopyButton
* test(CopyButton): 补充单元测试覆盖边界场景
* fix: unify CopyButton imports to named export across all consumers
* fix(CopyButton): add aria-label for screen reader accessibility
This commit is contained in:
LingandRX
2026-06-05 21:15:48 +08:00
committed by 雨霖铃
parent 2c45ddada9
commit 4d038203a7
10 changed files with 204 additions and 9 deletions
+1 -1
View File
@@ -1,7 +1,7 @@
import React, { useEffect, useState } from 'react';
import { Clock } from 'lucide-react';
import { toast } from 'sonner';
import CopyButton from '@/components/CopyButton';
import { CopyButton } from '@/components/CopyButton';
import type { UnitType } from './constants';
import { msToUnit } from './constants';
import { useI18n } from '@/utils/chromeI18n';
+1 -1
View File
@@ -1,5 +1,5 @@
import React from 'react';
import CopyButton from '@/components/CopyButton';
import { CopyButton } from '@/components/CopyButton';
import { useI18n } from '@/utils/chromeI18n';
import { cn } from '@/lib/utils';