Skip to content

Commit

Permalink
fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
DerekAgility committed Dec 17, 2024
1 parent bf05727 commit 8069417
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
8 changes: 4 additions & 4 deletions stories/atoms/buttons/Button/tests/Button.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,28 +59,28 @@ describe("<Button>", () => {
expect(buttonElement).toHaveClass("px-[13px]");
});

it("redners with size xs", () => {
it("renders with size xs", () => {
render(<Button {...defaultProps} size="xs" />);

const buttonElement = screen.getByRole("button");
expect(buttonElement).toHaveClass("px-[11px]");
});

it("redners with size md", () => {
it("renders with size md", () => {
render(<Button {...defaultProps} size="md" />);

const buttonElement = screen.getByRole("button");
expect(buttonElement).toHaveClass("px-[17px] text-sm");
});

it("redners with size lg", () => {
it("renders with size lg", () => {
render(<Button {...defaultProps} size="lg" />);

const buttonElement = screen.getByRole("button");
expect(buttonElement).toHaveClass("px-[17px] text-base");
});

it("redners with size xl", () => {
it("renders with size xl", () => {
render(<Button {...defaultProps} size="xl" />);

const buttonElement = screen.getByRole("button");
Expand Down
5 changes: 2 additions & 3 deletions stories/atoms/icons/TablerIcon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,16 @@ import { TablerIconName } from "./tablerIconNames";
import * as TablerIcons from "@tabler/icons-react";
import { ClassNameWithAutocomplete } from "@/utils/types";

type TablerIconKeys = keyof typeof TablerIcons;
export interface ITablerIconProps extends React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement> {
icon: TablerIconName | TablerIconKeys;
icon: TablerIconName;
className?: ClassNameWithAutocomplete;
}

const TablerIcon: React.FC<ITablerIconProps> = ({
icon,
className = "w-6 h-6 text-gray-600"
}: ITablerIconProps): JSX.Element => {
const Icon = TablerIcons[icon as TablerIconKeys];
const Icon = TablerIcons[icon];

Check failure on line 15 in stories/atoms/icons/TablerIcon.tsx

View workflow job for this annotation

GitHub Actions / type-check

Element implicitly has an 'any' type because expression of type '"Icon123" | "Icon24Hours" | "Icon2fa" | "Icon360View" | "Icon360" | "Icon3dCubeSphereOff" | "Icon3dCubeSphere" | "Icon3dRotate" | "IconAB2" | "IconABOff" | "IconAB" | "IconAbacusOff" | ... 4319 more ... | "IconZzz"' can't be used to index type 'typeof import("/home/runner/work/agility-plenum-ui/agility-plenum-ui/node_modules/@tabler/icons-react/dist/tabler-icons-react")'.
return (
<i>
<Icon className={className} />
Expand Down

0 comments on commit 8069417

Please sign in to comment.