Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Selector import fix #66

Merged
merged 2 commits into from
May 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/components/AccountSelector/AccountSelector.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { FiUser } from "react-icons/fi";
import { MassaToken } from "../Icons/Svg/SvgComponent/MassaToken";
import { AccountSelectorButton } from "./AccountSelector";
import { AccountSelector } from "./AccountSelector";

export default {
title: "Components/Account Selector",
component: AccountSelectorButton,
component: AccountSelector,
};

const args = {
Expand All @@ -15,5 +15,5 @@ const args = {
};

export const _AccountSelector = {
render: () => <AccountSelectorButton {...args} />,
render: () => <AccountSelector {...args} />,
};
6 changes: 3 additions & 3 deletions src/components/AccountSelector/AccountSelector.test.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { render, fireEvent, screen } from "@testing-library/react";
import { AccountSelectorButton } from "./AccountSelector";
import { AccountSelector } from "./AccountSelector";
import { FiUser, FiAlertTriangle } from "react-icons/fi";

describe("Components | Buttons | Account Selector", () => {
Expand All @@ -10,7 +10,7 @@ describe("Components | Buttons | Account Selector", () => {
icon: <FiAlertTriangle />,
amount: "0,000.00",
};
render(<AccountSelectorButton {...args} />);
render(<AccountSelector {...args} />);

let accountSelector = screen.getByTestId("account-selector-button");

Expand All @@ -25,7 +25,7 @@ describe("Components | Buttons | Account Selector", () => {
icon: <FiAlertTriangle />,
amount: "0,000.00",
};
render(<AccountSelectorButton onClick={onClickMock} {...args} />);
render(<AccountSelector onClick={onClickMock} {...args} />);

let accountSelector = screen.getByTestId("account-selector-button");

Expand Down
2 changes: 1 addition & 1 deletion src/components/AccountSelector/AccountSelector.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export interface AccountSelectorProps extends ComponentPropsWithoutRef<"div"> {
children?: ReactNode;
}

export function AccountSelectorButton(props: AccountSelectorProps) {
export function AccountSelector(props: AccountSelectorProps) {
let { avatar, accountName, icon, amount, children, ...rest } = props;

const accountSelectorClass = "flex flex-row items-center justify-between";
Expand Down