Skip to content

Commit

Permalink
fix(ui-button): remove dev dependency on ui-icons (#705)
Browse files Browse the repository at this point in the history
  • Loading branch information
aversini authored Sep 28, 2024
1 parent d44fb17 commit b05ab47
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 9 deletions.
3 changes: 0 additions & 3 deletions packages/ui-button/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,6 @@
"react": "^18.3.1",
"react-dom": "^18.3.1"
},
"devDependencies": {
"@versini/ui-icons": "workspace:../ui-icons"
},
"dependencies": {
"@tailwindcss/typography": "0.5.15",
"@versini/ui-private": "workspace:../ui-private",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,33 @@
import { render, screen } from "@testing-library/react";
import { IconSettings } from "@versini/ui-icons";
import { SvgIcon } from "@versini/ui-private";

import { expectToHaveClasses } from "../../../../../../configuration/tests-helpers";
import { BUTTON_CLASSNAME } from "../../../common/constants";
import { ButtonIcon } from "../ButtonIcon";

const IconSettings = ({
className,
viewBox,
spacing,
title,
monotone,
...rest
}: any) => {
return (
<SvgIcon
defaultViewBox="0 0 448 512"
defaultClassName="size-5"
viewBox={viewBox}
className={className}
spacing={spacing}
title={title || "Settings"}
{...rest}
>
<path d="M8 256a56 56 0 1 1 112 0A56 56 0 1 1 8 256zm160 0a56 56 0 1 1 112 0 56 56 0 1 1 -112 0zm216-56a56 56 0 1 1 0 112 56 56 0 1 1 0-112z" />
</SvgIcon>
);
};

describe("ButtonIcon (exceptions)", () => {
it("should be able to require/import from root", () => {
expect(ButtonIcon).toBeDefined();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,34 @@
import { render, screen } from "@testing-library/react";
import userEvent from "@testing-library/user-event";
import { IconSettings } from "@versini/ui-icons";
import { SvgIcon } from "@versini/ui-private";

import { expectToHaveClasses } from "../../../../../../configuration/tests-helpers";
import { BUTTON_CLASSNAME } from "../../../common/constants";
import { ButtonSort_private as ButtonSort } from "../ButtonSort";

const IconSettings = ({
className,
viewBox,
spacing,
title,
monotone,
...rest
}: any) => {
return (
<SvgIcon
defaultViewBox="0 0 448 512"
defaultClassName="size-5"
viewBox={viewBox}
className={className}
spacing={spacing}
title={title || "Settings"}
{...rest}
>
<path d="M8 256a56 56 0 1 1 112 0A56 56 0 1 1 8 256zm160 0a56 56 0 1 1 112 0 56 56 0 1 1 -112 0zm216-56a56 56 0 1 1 0 112 56 56 0 1 1 0-112z" />
</SvgIcon>
);
};

describe("ButtonSort (exceptions)", () => {
it("should be able to require/import from root", () => {
expect(ButtonSort).toBeDefined();
Expand Down
4 changes: 0 additions & 4 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit b05ab47

Please sign in to comment.