refactor: use Button component instead of plain button in CopyButton (#25489)
* refactor: use Button component instead of plain button in CopyButton Co-Authored-By: [email protected] <[email protected]> * add shrink-0 to StartIcon and EndIcon of Button * remove unused class names --------- Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
1 parent
0103321b71
commit
41ad0f718d
2 files changed
+15
-22
No files matched your search
@@ -264,14 +264,15 @@ export const Button = forwardRef<HTMLAnchorElement | HTMLButtonElement, ButtonPr
|
||||
<>
|
||||
{variant === "fab" ? (
|
||||
<>
|
||||
<Icon name={StartIcon} className="hidden h-4 w-4 stroke-[1.5px] md:inline-flex" />
|
||||
<Icon name="plus" data-testid="plus" className="inline h-6 w-6 md:hidden" />
|
||||
<Icon name={StartIcon} className="hidden h-4 w-4 shrink-0 stroke-[1.5px] md:inline-flex" />
|
||||
<Icon name="plus" data-testid="plus" className="inline h-6 w-6 shrink-0 md:hidden" />
|
||||
</>
|
||||
) : (
|
||||
<Icon
|
||||
data-name="start-icon"
|
||||
name={StartIcon}
|
||||
className={classNames(
|
||||
"shrink-0",
|
||||
loading ? "invisible" : "visible",
|
||||
"button-icon group-[:not(div):active]:translate-y-[0.5px]",
|
||||
variant === "icon" && "h-4 w-4",
|
||||
@@ -313,13 +314,14 @@ export const Button = forwardRef<HTMLAnchorElement | HTMLButtonElement, ButtonPr
|
||||
<>
|
||||
{variant === "fab" ? (
|
||||
<>
|
||||
<Icon name={EndIcon} className="-mr-1 me-2 ms-2 hidden h-5 w-5 md:inline" />
|
||||
<Icon name="plus" data-testid="plus" className="inline h-6 w-6 md:hidden" />
|
||||
<Icon name={EndIcon} className="-mr-1 me-2 ms-2 hidden h-5 w-5 shrink-0 md:inline" />
|
||||
<Icon name="plus" data-testid="plus" className="inline h-6 w-6 shrink-0 md:hidden" />
|
||||
</>
|
||||
) : (
|
||||
<Icon
|
||||
name={EndIcon}
|
||||
className={classNames(
|
||||
"shrink-0",
|
||||
loading ? "invisible" : "visible",
|
||||
"group-[:not(div):active]:translate-y-[0.5px]",
|
||||
variant === "icon" && "h-4 w-4",
|
||||
|
||||
Reference in new issue
Block a user