fix: Fix button linter rules

Signed-off-by: Carlos Esteban Lopez <lcarlosesteb@vmware.com>
This commit is contained in:
Carlos Esteban Lopez
2022-12-13 11:28:56 -05:00
committed by Carlos Lopez
parent 9ccbf26581
commit 87cbf39fa1
7 changed files with 22 additions and 19 deletions
@@ -23,6 +23,8 @@ import {
SvgIcon,
Tooltip,
} from '@material-ui/core';
import Button from '@material-ui/core/Button';
import type { Transformer } from './transformer';
const CopyToClipboardTooltip = withStyles(theme => ({
tooltip: {
@@ -65,15 +67,13 @@ const CopyToClipboardButton = ({ text }: CopyToClipboardButtonProps) => {
onClose={handleClose}
leaveDelay={1000}
>
<button className="md-clipboard md-icon" onClick={handleClick}>
<Button className="md-clipboard md-icon" onClick={handleClick}>
<CopyToClipboardIcon />
</button>
</Button>
</CopyToClipboardTooltip>
);
};
import type { Transformer } from './transformer';
/**
* Recreates copy-to-clipboard functionality attached to <code> snippets that
* is native to mkdocs-material theme.
@@ -16,6 +16,7 @@
import { ApiProvider } from '@backstage/core-app-api';
import { searchApiRef } from '@backstage/plugin-search-react';
import { TestApiRegistry, wrapInTestApp } from '@backstage/test-utils';
import Button from '@material-ui/core/Button';
import {
act,
fireEvent,
@@ -136,9 +137,9 @@ describe('<TechDocsSearch />', () => {
const [entityName, setEntityName] = useState(entityId);
return wrapInTestApp(
<ApiProvider apis={apiRegistry}>
<button onClick={() => setEntityName(newEntityId)}>
<Button onClick={() => setEntityName(newEntityId)}>
Update Entity
</button>
</Button>
<TechDocsSearch entityId={entityName} debounceTime={0} />
</ApiProvider>,
);