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

ButtonGroup for trekbag has a bug #12

Open
Rope-a-dope opened this issue Jun 4, 2024 · 0 comments
Open

ButtonGroup for trekbag has a bug #12

Rope-a-dope opened this issue Jun 4, 2024 · 0 comments

Comments

@Rope-a-dope
Copy link

All buttons are not showing because the text is not passed, can be passed as children.

ButtonGroup

    <section className="button-group">
      {secondaryButtons.map((button) => (
        <Button
          key={button.text + button.onClick.toString()}
          onClick={button.onClick}
          buttonType="secondary"
        >
          {button.text}
        </Button>
      ))}
    </section>
export default function Button({ onClick, buttonType, children }) {
  return (
    <button
      onClick={onClick}
      className={`btn ${buttonType === "secondary" && "btn--secondary"}`}
    >
      {children}
    </button>
  );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant