Skip to content

Button text not showing in trekbag final-code #21

Open
@peterdanwan

Description

@peterdanwan

Hello! I noticed a potential issue within the final-code directory for trekbag:

The ButtonGroup component is not passing children to the Button component despite the Button component being written to accept the children prop (not the text prop):

<Button
key={button.text + button.onClick.toString()}
text={button.text}
onClick={button.onClick}
buttonType="secondary"
/>

This results in each Button's text not showing:
no-text

Adjusting the ButtonGroup component like so fixes the issue:

buttongroup-fix
buttongroup-shows

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