mirror of
https://github.com/portainer/portainer.git
synced 2025-07-24 15:59:41 +02:00
feat(home): move edge device to view [EE-4559] (#8189)
Co-authored-by: matias.spinarolli <matias.spinarolli@portainer.io>
This commit is contained in:
parent
b4a6f6911c
commit
7fe0712b61
72 changed files with 988 additions and 1593 deletions
|
@ -8,29 +8,26 @@ export function LinkButton({
|
|||
to,
|
||||
params,
|
||||
disabled,
|
||||
children,
|
||||
className,
|
||||
children,
|
||||
title = '',
|
||||
...props
|
||||
}: ComponentProps<typeof Button> & ComponentProps<typeof Link>) {
|
||||
const button = (
|
||||
return (
|
||||
<Button
|
||||
title={title}
|
||||
size="medium"
|
||||
// eslint-disable-next-line react/jsx-props-no-spreading
|
||||
{...props}
|
||||
className={clsx(className, '!m-0')}
|
||||
size="medium"
|
||||
className={clsx(className, '!m-0 no-link')}
|
||||
disabled={disabled}
|
||||
as={disabled ? 'span' : Link}
|
||||
props={{
|
||||
to,
|
||||
params,
|
||||
}}
|
||||
>
|
||||
{children}
|
||||
</Button>
|
||||
);
|
||||
|
||||
if (disabled) {
|
||||
return button;
|
||||
}
|
||||
|
||||
return (
|
||||
<Link to={to} params={params} className="text-inherit hover:no-underline">
|
||||
{button}
|
||||
</Link>
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue