Skip to content

ButtonGroup for trekbag has a bug #12

Open
@Rope-a-dope

Description

@Rope-a-dope

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>
  );
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions