mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2026-04-21 22:16:17 +00:00
Replace some bootstrap utility classes with tailwind ones
This commit is contained in:
@@ -13,11 +13,11 @@ describe('<DeleteServerButton />', () => {
|
||||
const DeleteServerButton = DeleteServerButtonFactory(fromPartial({
|
||||
DeleteServerModal: (props: DeleteServerModalProps) => <DeleteServerModal {...props} deleteServer={vi.fn()} />,
|
||||
}));
|
||||
const setUp = (children?: ReactNode) => {
|
||||
const setUp = (children: ReactNode = 'Remove this server') => {
|
||||
const history = createMemoryHistory({ initialEntries: ['/foo'] });
|
||||
const result = renderWithEvents(
|
||||
<Router location={history.location} navigator={history}>
|
||||
<DeleteServerButton server={fromPartial({})} textClassName="button">{children}</DeleteServerButton>
|
||||
<DeleteServerButton server={fromPartial({})}>{children}</DeleteServerButton>
|
||||
</Router>,
|
||||
);
|
||||
|
||||
@@ -30,7 +30,6 @@ describe('<DeleteServerButton />', () => {
|
||||
['Foo bar'],
|
||||
['baz'],
|
||||
['something'],
|
||||
[undefined],
|
||||
])('renders expected content', (children) => {
|
||||
const { container } = setUp(children);
|
||||
expect(container.firstChild).toBeTruthy();
|
||||
|
||||
@@ -2,67 +2,27 @@
|
||||
|
||||
exports[`<DeleteServerButton /> > renders expected content 1`] = `
|
||||
<button
|
||||
class="p-0 bg-transparent border-0"
|
||||
class="tw:text-danger tw:hover:underline"
|
||||
type="button"
|
||||
>
|
||||
<span
|
||||
class="button"
|
||||
>
|
||||
Foo bar
|
||||
</span>
|
||||
Foo bar
|
||||
</button>
|
||||
`;
|
||||
|
||||
exports[`<DeleteServerButton /> > renders expected content 2`] = `
|
||||
<button
|
||||
class="p-0 bg-transparent border-0"
|
||||
class="tw:text-danger tw:hover:underline"
|
||||
type="button"
|
||||
>
|
||||
<span
|
||||
class="button"
|
||||
>
|
||||
baz
|
||||
</span>
|
||||
baz
|
||||
</button>
|
||||
`;
|
||||
|
||||
exports[`<DeleteServerButton /> > renders expected content 3`] = `
|
||||
<button
|
||||
class="p-0 bg-transparent border-0"
|
||||
class="tw:text-danger tw:hover:underline"
|
||||
type="button"
|
||||
>
|
||||
<span
|
||||
class="button"
|
||||
>
|
||||
something
|
||||
</span>
|
||||
</button>
|
||||
`;
|
||||
|
||||
exports[`<DeleteServerButton /> > renders expected content 4`] = `
|
||||
<button
|
||||
class="p-0 bg-transparent border-0"
|
||||
type="button"
|
||||
>
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
class="svg-inline--fa fa-circle-minus fa-fw "
|
||||
data-icon="circle-minus"
|
||||
data-prefix="fas"
|
||||
focusable="false"
|
||||
role="img"
|
||||
viewBox="0 0 512 512"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
>
|
||||
<path
|
||||
d="M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM184 232l144 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-144 0c-13.3 0-24-10.7-24-24s10.7-24 24-24z"
|
||||
fill="currentColor"
|
||||
/>
|
||||
</svg>
|
||||
<span
|
||||
class="button"
|
||||
>
|
||||
Remove this server
|
||||
</span>
|
||||
something
|
||||
</button>
|
||||
`;
|
||||
|
||||
Reference in New Issue
Block a user